Image information encoding/decoding system

ABSTRACT

A bit train of a plurality of continuous pixels is compressed according to a new run-length compression scheme. In this run-length compression scheme, the run information of one unit compression includes run-length information indicating the continuous number of the same pixel data blocks, or the number of pixels followed, and pixel data having a two-bit configuration for discriminating three or more colors of the pixels.

This is a division of application Ser. No. 08/806,684 filed Feb. 26,1997 now U.S. Pat. No. 5,845,021, which is a division of applicationSer. No. 08/577,100 filed on Dec. 22, 1995 and issued on Feb. 24, 1998as U.S. Pat. No. 5,721,720.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to the following methods, devices,apparatuses, and systems:

(1) an encoding method of compressing/encoding recorded digital imagedata, such as caption data or simple animated cartoon data;

(2) a decoding method of decoding the compressed/encoded data;

(3) a compression/expansion system as a combination of the aboveencoding and decoding methods;

(4) a recording medium (two-sided or double-sided high-density opticaldisk) on which information is recorded by the above encoding method;

(5) a device (an integrated circuit or the like) for performing signalprocessing based on the encoding method;

(6) a device (an integrated circuit or the like) for performing signalprocessing based on the decoding method;

(7) a recording apparatus for recording various pieces of information ona recording medium by the encoding method;

(8) a playing back apparatus for playing back the information from therecording medium by the decoding method;

(9) a broadcasting/distributing system for broadcasting/distributingvarious pieces of information, which are compressed/encoded by theencoding method, by radio or wire; and

(10) an electronic mail system for exchanging various pieces ofinformation, which are compressed/encoded by the encoding method, byradio or via network lines (e.g., internet lines).

2. Description of the Related Art

As methods of compressing and recording or communicating image data,such as caption data, the following conventional methods are known.

The first method is a character code conversion method, in which textdata is separated for every other word, and character codescorresponding to the respective words are recorded or communicated asdata. Currently, as character codes, 2-byte codes used for Japanese and1-byte codes used for English are widely used. As Japanese codes, JIScodes, shift JIS codes, and the like are used. As English codes, ASCIIcodes and the like are used.

In the first method, a character font ROM-corresponding to eachcharacter code set must be prepared in the image playing back apparatus.A character code which does not correspond to any one of the characterfont ROMs cannot be played back. For this reason, in order to allow theimage playing back apparatus to handle a plurality of languages, acharacter font ROM is required for each language.

The second method is a method of reading test data as image data andencoding the data to compress the entire data. As a typical example ofthis encoding method, a run-length compression method is known.

In the run-length compression method, the length of continuous pixels ofcontinuous identical data of pixel data obtained by scanning text dataline by line is converted into a run-length code, and the resultant datais recorded or transmitted.

Consider a pixel data line like aaaabbbbbbbcccccdd". According to therun-length compression method, this data line is converted into data(run-length compressed code) like "a4, b7, c5, d2" consisting of piecesof pixel information (a, b, c, and d) and the numbers of pixels followed(4, 7, 5, and 2) indicating the numbers of pieces of pixel information.

As methods of further converting this run-length compressed code into abinary code, modified Huffman codings and arithmetic codings are known.

Modified Huffman codes (to be abbreviated to MH codes) used as standardcodes in facsimile apparatuses will be briefly described first. Notethat MH codes are used only when the contents of image information,i.e., pixels, have two colors, i.e., black and white.

A data file is converted into MH codes by using an algorithm which isdesigned such that a binary bit code having a small number of bits(i.e., a simple code) is assigned to data with a statistically highfrequency of use (i.e., frequently used data), and a binary bit codehaving a large number of bits (i.e., a complicated code) is assigned todata with a low frequency of use (i.e., rarely used data) so as toreduce the total data amount of the data file.

In MH codings, as the number of types of data to be encoded increases, acorresponding code table increases in size. In addition, complicatedcode tables corresponding to the number of data to be encoded arerequired in both an encoder and a decoder.

For this reason, MH codings in a multilingual system handling variouslanguages lead to great increases in the costs of both the encoder andthe decoder.

Arithmetic codings will be described next.

In performing arithmetic codings, first, data is read, and the frequencyof use of each data is checked. Codes having small numbers of bits arethen assigned to the data in the order of decreasing frequencies of useso as to form a code table. The code table formed in this manner isrecorded (or transmitted) as data. Thereafter, the data is encoded onthe basis of this code table.

In arithmetic codings, although a code table must be recorded ortransmitted, data can be formed by using a code table optimal for thecontents of a file to be recorded or transmitted. In addition, inarithmetic codings, complicated code tables are not required in both anencoder and a decoder, unlike in MH codings.

In arithmetic codings, however, because a code table is formed inencoding data, the data must be read twice, and decoding processing iscomplicated.

U.S. Pat. No. 4,811,113 discloses an image encoding method that isdifferent from the above two methods. In this method, a flag bitrepresenting the number of bits as a code data length is prepared beforea run-length code, and encoding and decoding are performed while aninteger multiple of the value of the flag bit is regarded as a code datalength.

In this method, since a data length is calculated from a flag bit, alarge code table is not required, unlike in MH codings. However, theinternal circuit arrangement of a decoder tends to be complicatedbecause of the hardware for calculating a code data length.

In addition, in this method, although monochrome (black and white) datacan be encoded/decoded as in MH codings, multi-color image data cannotbe compressed without any improvement.

SUMMARY OF THE INVENTION

It is the first object of the present invention to provide an imageinformation encoding method which can eliminate the drawback (i.e., thenecessity of using large code tables) of MH codings, the drawback (i.e.,the necessity to read data twice) of arithmetic codings, and thedrawback (i.e., the inability to compress multi-color image data) of theflag-bit-attached run-length coding method (U.S. Pat. No. 4,811,113) ata practical level.

It is the second object of the present invention to provide a decodingmethod of decoding data encoded in accordance with the first object.

It is the third object of the present invention to provide acompression/expansion system based on a combination of the encoding(compression) method and the decoding (expansion) method according tothe first and second objects.

It is the fourth object of the present invention to provide a recordingmedium (e.g., a two-sided high-density optical disk) on whichinformation is recorded by the encoding method according to the firstobject.

It is the fifth object of the present invention to provide a device(e.g., an integrated circuit) for performing signal processing based onthe encoding method according to the first object.

It is the sixth object of the present invention to provide a device(e.g., an integrated circuit) for performing signal processing based onthe decoding method according to the second object.

It is the seventh object of the present invention to provide a recordingapparatus for recording various pieces of information on a recordingmedium (e.g., a two-sided high-density optical disk) by the encodingmethod according to the first object.

It is the eight object of the present invention to provide a playingback apparatus for playing back information recorded on the aboverecording medium by the decoding method according to the second object.

It is the ninth object of the present invention to provide abroadcasting/distributing system for broadcasting/distributing variouspieces of information, which are compressed/encoded by the encodingmethod according to the first object, by radio or wire.

It is the tenth object of the present invention to provide an electronicmail system for exchanging various pieces of information, which arecompressed/encoded by the encoding method according to the first object,by radio or via network lines (e.g., internet lines).

To achieve the above-mentioned first object, according to an encodingmethod of the present invention, an information integral body (e.g., PXDin FIGS. 9A and 9B, or SPD in FIG. 10), formed of a plurality of pixeldata each defined by a predetermined number of bits (e.g., 2-bit), isprocessed so that a data block, containing the same continuous pixeldata, is compressed as one unit of compression (e.g., any of CU01 toCU04 in FIGS. 9A and 9B). The encoding method comprises the steps of:

a compression data specifying step (e.g., ST801 in FIG. 13) forspecifying the data block of the one compression unit (CU01-CU04) of theinformation integral body (PXD/SPD); and

a compression data generating step (e.g., ST806 in FIG. 13, or ST908 toST914 in FIG. 14) for generating a compressed unit data block (e.g.,CU01* to CU04* in FIG. 9B) in accordance with a coding header (e.g.,0-bit to 6-bit of rules 1 to 4 in FIGS. 5A-5D) corresponding to acontinuing number (e.g., any of 1 to 255) of the same pixel data in thedata block of the one compression unit, with a number of pixels followed(e.g., 2-bit to 8-bit) indicating the continuing number (1-255) of thesame pixel data, and with data (e.g., 2-bit) representing the same pixeldata in the data block of the one compression unit.

To achieve the above-mentioned second object, according to a decodingmethod of the present invention, a bit train of one unit of a compresseddata block, obtained by compressing the same continuous pixel data asone unit of compression, is expanded (e.g., ST1005 in FIG. 15), whereinthe compressed data block corresponds to at least part of an informationintegral body (e.g., PXD in FIG. 9A, or SPD in FIG. 10) formed by aplurality of pixel data each defined by a predetermined number of bits(e.g., 2-bit), and the compressed data block includes a coding headerindicating data of a number of pixels followed, which number datacorresponds to the number of the same continuous pixel data, or includesa coding header indicating the number data of pixels followed as well asthe same continuous pixel data thereof. The decoding method comprisesthe steps of:

a coding header detecting step (e.g., ST1101 to ST1109 in FIG. 16) fordetecting the coding header from the data block (e.g., any of CU01* toCU04* in FIG. 9B) of the one compression unit contained in theinformation integral body (PXD/SPD);

a continuous pixel number detecting step (e.g., ST1110 to ST1113 in FIG.16) for detecting the number data of the pixels followed (e.g., any of2-bit to 8-bit in FIGS. 5A-5D, or data length of zero as in the case ofrule 5 in FIG. 5E; the zero data length will not affect on a latersubtraction), from the data block (e.g., any of CU01* to CU04* in FIG.9B) of the one compression unit, in accordance with a content of thecoding header (e.g., data length of any of 0-bit to 6-bit at rules 1 to4 in FIGS. 5A-5D; the data length of 0-bit as in the case of rule 1 willnot affect on a later subtraction) detected by the coding headerdetecting step (ST1101 to ST1109);

a pixel data determining step (e.g., ST1114 in FIG. 16) for determininga content (e.g., any of "00", "01", "10", "11") of the pixel data in anuncompressed data block (e.g., any of CU01 to CU04 in FIG. 9A) of theone compression unit, in accordance with a remainder (e.g., 2-bit of thepixel data at rules 1 to 4 in FIGS. 5A-D) of the data block (e.g., anyof CU01* to CU04* in FIG. 9) of the one compression unit, from whichremoved are the coding header (e.g., any of 0-bit to 6-bit) detected bythe coding header detecting step (ST1101 to ST1109 in FIG. 16) and thenumber data of the pixels followed (e.g., any of 2-bit to 8-bit in FIGS.5A-5D) detected by the continuous pixel number detecting step (ST1110 toST1113 in FIG. 16); and

a pixel pattern restoration step (e.g., ST1115 to ST1118 in FIG. 16) forarranging bit data of the content determined by the pixel datadetermining step (ST1114 in FIG. 16), by a number indicated by thenumber data of the pixels followed (e.g., any of 2-bit to 8-bit in FIGS.5A-5D) detected by the continuous pixel number detecting step (ST1110 toST1113 in FIG. 16), so as to restore a pattern of uncompressed pixeldata of the one compression unit.

To achieve the above-mentioned third object, according to a system ofthe present invention, an information integral body (e.g., PXD in FIG.9A, or SPD in FIG. 10), formed of a plurality of pixel data each definedby a predetermined number of bits (e.g., 2-bit), is processed so that adata block, containing the same continuous pixel data, is compressed(e.g., ST806 in FIG. 13) as one unit of compression (e.g., any of CU01to CU04 in FIG. 9A), and a bit train of the compressed data block isthen expanded (e.g., ST1005 in FIG. 15). The system is constituted by acombination of:

(a) an encoding processing including:

a step (e.g., ST806 in FIG. 13) for generating a compressed unit datablock (e.g., CU01* to CU04* in FIG. 9B) in accordance with a codingheader (e.g., 0-bit to 6-bit of rules 1 to 4 in FIGS. 5A.5D)corresponding to a continuing number (e.g., any of 1 to 255) of the samepixel data in the data block of the one compression unit, with a numberof pixels followed (e.g., 2-bit to 8-bit) indicating the continuingnumber (1-255) of the same pixel data, and with data (e.g., 2-bit)representing the same pixel data in the data block of the onecompression unit, and

(b) a decoding-processing including:

a coding header detecting step (e.g., ST1101 to ST1109 in FIG. 16) fordetecting the coding header from the data block (e.g., any of CU01* toCU04* in FIG. 9B) of the one compression unit generated by thegenerating step of the encoding processing, wherein the coding headerindicates the number of pixels followed (e.g., 2-bit to 8-bit), orindicates a group of the number of pixels followed (e.g., 2-bit to8-bit) and the same pixel data (e.g., 2-bit);

a continuous pixel number detecting step (e.g., ST1101 to ST1113 in FIG.16) for detecting the number data of the pixels followed (e.g., any of2-bit to 8-bit in FIGS. 5A-5D) from the data block (e.g., any of CU01*to CU04* in FIG. 9B), after the coding header is detected;

a pixel data determining step (e.g., ST1114 in FIG. 16) for determininga content (e.g., any of "00", "01", "10", "11") of the pixel data in anuncompressed data block (e.g., any of CU01 to CU04 in FIG. 9B) of theone compression unit, in accordance with a remainder (e.g., 2-bit of thepixel data at rules 1 to 4 in FIGS. 5A-5D) of the data block (e.g., anyof CU01* to CU04* in FIG. 9B) of the one compression unit, from whichremoved are the coding header (e.g., any of 0-bit to 6-bit; the datalength of 0-bit of the header will not affect on A later subtraction)detected by the coding header detecting step (ST1101 to ST1109 in FIG.16) and the number data of the pixels followed (e.g., any of 2-bit to8-bit in FIGS. 5A-5D) detected by the continuous pixel number detectingstep (ST1110 to ST1113 in FIG. 16); and

a pixel pattern restoration step (e.g., ST1115 to ST1118 in FIG. 16) forarranging bit data of the content determined by the pixel datadetermining step (ST1114 in FIG. 16), by a number indicated by thenumber data of the pixels followed (e.g., any of 2-bit to 8-bit in FIGS.5A-5D) detected by the continuous pixel number detecting step (ST1110 toST1113 in FIG. 16), so as to restore a pattern of uncompressed pixeldata of the one compression unit.

To achieve the above-mentioned fourth object, according to aninformation recording medium of the present invention, an informationintegral body (e.g., PXD in FIG. 9A, or SPD in FIG. 10), formed of aplurality of pixel data each defined by a predetermined number of bits(e.g., 2-bit), is recorded so that a data block, containing the samecontinuous pixel data, is compressed as one unit of compression (e.g.,any of CU01 to CU04 in FIG. 9A). The information recording medium storesa compressed unit data block (e.g., CU01* to CU04* in FIG. 9B) whichcomprises a coding header (e.g., 0-bit to 6-bit of rules 1 to 4 in FIGS.5A-5D) corresponding to a continuing number (e.g., any of 1 to 255) ofthe same pixel data in the data block of the one compression unit, anumber of pixels followed (e.g., 2-bit to 8-bit) indicating thecontinuing number (1-255) of the same pixel data, and data (e.g., 2-bit)representing the same pixel data in the data block of the onecompression unit.

To achieve the above-mentioned fifth object, according to an encodingapparatus (such as an integrated circuit device in which the encodingmethod of the first object is used) of the present invention, aninformation integral body (e.g., PXD in FIG. 9A, or SPD in FIG. 10),formed of a plurality of pixel data each defined by a predeterminednumber of bits (e.g., 2-bit), is processed so that a data block,containing the same continuous pixel data, is compressed as one unit ofcompression (e.g., any of CU01 to CU04 in FIG. 9A). The encodingapparatus comprises:

a compression data specifying means (e.g., ST801 in FIG. 13) forspecifying the data block of the one compression unit (CU01-CU04) of theinformation integral body (PXD/SPD); and

a compression data generating means (e.g., ST806 in FIG. 13, or ST908 toST914 in FIG. 14) for generating a compressed unit data block (e.g.,CU01* to CU04* in FIG. 9B) in accordance with a coding header (e.g.,0-bit to 6-bit of rules 1 to 4 in FIGS. 5A-5B) corresponding to acontinuing number (e.g., any of 1 to 255) of the same pixel data in thedata block of the one compression unit, with a number of pixels followed(e.g., 2-bit to 8-bit) indicating the continuing number (1-255) of thesame pixel data, and with data (e.g., 2-bit) representing the same pixeldata in the data block of the one compression unit.

To achieve the above-mentioned sixth object, according to a decodingapparatus (such as an integrated circuit device in which the decodingmethod of the second object is used) of the present invention, a bittrain of one unit of a compressed data block, obtained by compressingthe same continuous pixel data as one unit of compression, is expanded(e.g., ST1005 in FIG. 15), wherein the compressed data block correspondsto at least part of an information integral body (e.g., PXD in FIG. 9A,or SPD in FIG. 10) formed by a plurality of pixel data each defined by apredetermined number of bits (e.g., 2-bit), and the compressed datablock includes a coding header indicating data of a number of pixelsfollowed, which number data corresponds to the number of the samecontinuous pixel data, or includes a coding header indicating the numberdata of pixels followed as well as the same continuous pixel datathereof. The decoding apparatus comprises:

a coding header detecting means (e.g., ST1110 to ST1109 in FIG. 16) fordetecting the coding header from the data block (e.g., any of CU01* toCU04* in FIG. 9B) of the one compression unit contained in theinformation integral body (PXD/SPD);

a continuous pixel number detecting means (e.g., ST1110 to ST1113 inFIG. 16) for detecting the number data of the pixels followed (e.g., anyof 2-bit to 8-bit in FIGS. 5A-5D), from the data block (e.g., any ofCU01* to CU04* in FIG. 9B) of the one compression unit, in accordancewith a content of the coding header (e.g., data length of any of 0-bitto 6-bit at rules 1 to 4 in FIGS. 5A-5D) detected by the coding headerdetecting means (ST1101 to ST1109);

a pixel data determining means (e.g., ST114 in FIG. 16) for determininga content (e.g., any of "00", "01", "10", "11") of the pixel data in anuncompressed data block (e.g., any of CU01 to CU04 in FIG. 9A) of theone compression unit, in accordance with a remainder (e.g., 2-bit of thepixel data at rules 1 to 4 in FIGS. 5A-5D) of the data block (e.g., anyof CU01* to CU04* in FIG. 9B) of the one compression unit, from whichremoved are the coding header (e.g., any of 0-bit to 6-bit) detected bythe coding header detecting means (ST1101 to ST1109 in FIG. 16) and thenumber data of the pixels followed (e.g., any of 2-bit to 8-bit in FIGS.5A-5D) detected by the continuous pixel number detecting means (ST1110to ST1113 in FIG. 16); and

a pixel pattern restoration means (e.g., ST1115 to ST1118 in FIG. 16)for arranging bit data of the content determined by the pixel datadetermining means (ST1114 in FIG. 16), by a number indicated by thenumber data of the pixels followed (e.g., any of 2-bit to 8-bit in FIGS.5A-5D) detected by the continuous pixel number detecting means (ST1110to ST1113 in FIG. 16), so as to restore a pattern of uncompressed pixeldata of the one compression unit.

To achieve the above-mentioned seventh object, according to a recordingapparatus of the present invention, an information integral body (e.g.,PXD in FIG. 9A, or SPD in FIG. 10), formed of a plurality of pixel dataeach defined by a predetermined number of bits (e.g., 2-bit), isprocessed so that a data block, containing the same continuous pixeldata, is compressed as one unit of compression (e.g., any of CU01 toCU04 in FIG. 9A). The recording apparatus comprises:

a compression data generating means (e.g., 200 in FIG. 24; ST806 in FIG.13, or ST908 to ST914 in FIG. 14) for generating a compressed unit datablock (e.g., CU01* to CU04* in FIG. 9B) in accordance with a codingheader (e.g., 0-bit to 6-bit of rules 1 to 4 in FIGS. 5A-5D)corresponding to a continuing number (e.g., any of 1 to 255) of the samepixel data in the data block of the one compression unit, with a numberof pixels followed (e.g., 2-bit to 8-bit) indicating the continuingnumber (1-255) of the same pixel data, and with data (e.g., 2-bit)representing the same pixel data in the data block of the onecompression unit; and

a recording means (e.g., 702 to 704 in FIG. 24) for recording on aprescribed recording medium (e.g., OD in FIG. 24) the compressed unitdata block (e.g., CU01* to CU04* in FIG. 9B) generated by thecompression data generating means (200).

To achieve the above-mentioned eighth object, according to a playingback apparatus of the present invention, a bit train of one unit of acompressed data block, obtained by compressing the same continuous pixeldata as one unit of compression, is played back from a recording medium(e.g., OD) and is expanded (e.g., ST1005 in FIG. 15), wherein thecompressed data block corresponds to at least part of an informationintegral body (e.g., PXD in FIG. 9A, or SPD in FIG. 10) formed by aplurality of pixel data each defined by a predetermined number of bits(e.g., 2-bit), and the compressed data block includes a coding headerindicating data of a number of pixels followed, which number datacorresponds to the number of the same continuous pixel data, or includesa coding header indicating the number data of pixels followed as well asthe same continuous pixel data thereof. The playing back apparatuscomprises:

a coding header detecting means (e.g., ST1101 to ST1109 in FIG. 16) fordetecting the coding header from the data block (e.g., any of CU01* toCU04* in FIG. 9B) of the one compression unit contained in theinformation integral body (PXD/SPD);

a continuous pixel number detecting means (e.g., ST1110 to ST1113 inFIG. 16) for detecting the number data of the pixels followed (e.g., anyof 2-bit to 8-bit in FIGS. 5A-5D), from the data block (e.g., any ofCU01* to CU04* in FIG. 9B) of the one compression unit, in accordancewith a content of the coding header (e.g., data length of any of 0-bitto 6-bit at rules 1 to 4 in FIGS. 5A-5D) detected by the coding headerdetecting means (ST1101 to ST1109);

a pixel data determining means (e.g., ST1114 in FIG. 16) for determininga content (e.g., any of "00", "01", "10", "11") of the pixel data in anuncompressed data block (e.g., any of CU01 to CU04 in FIG. 9A) of theone compression unit, in accordance with a remainder (e.g., 2-bit of thepixel data at rules 1 to 4 in FIGS. 5A-5D) of the data block (e.g., anyof CU01* to CU04* in FIG. 9B) of the one compression unit, from whichremoved are the coding header (e.g., any of 0-bit to 6-bit) detected bythe coding header detecting means (ST1101 to ST1109 in FIG. 16) and thenumber data of the pixels followed (e.g., any of 2-bit to 8-bit in FIGS.5A-5D) detected by the continuous pixel number detecting means (ST1110to ST1113 in FIG. 16); and a pixel pattern restoration means (e.g.,ST1115 to ST1118 in FIG. 16) for arranging bit data of the contentdetermined by the pixel data determining means (ST1114 in FIG. 16), by anumber indicated by the number data of the pixels followed (e.g., any of2-bit to 8-bit in FIGS. 5A-5D) detected by the continuous pixel numberdetecting means (ST1110 to ST1113 in FIG. 16), so as to restore apattern of uncompressed pixel data of the one compression unit.

To achieve the above-mentioned ninth object, according to a broadcastingsystem of the present invention, an information integral body (e.g., PXDin FIG. 9A, or SPD in FIG. 10), formed of a plurality of pixel data eachdefined by a predetermined number of bits (e.g., 2-bit), is processed sothat a data block, containing the same continuous pixel data, iscompressed as one unit of compression (e.g., any of CU01 to CU04 in FIG.9A). The broadcasting system comprises:

an encoder (e.g., 200 in FIG. 10) for generating a compressed unit datablock (e.g., CU01* to CU04* in FIG. 9B) in accordance with a codingheader (e.g., 0-bit to 6-bit of rules 1 to 4 in FIGS. 5A-5D)corresponding to a continuing number (e.g., any of 1 to 255) of the samepixel data in the data block of the one compression unit, with a numberof pixels followed (e.g., 2-bit to 8-bit) indicating the continuingnumber (1-255) of the same pixel data, and with data (e.g., 2-bit)representing the same pixel data in the data block of the onecompression unit; and

a broadcasting means (e.g., 210 to 212 in FIG. 10) for outputting, bymeans of a radio wave or signal cable, the compressed unit data block(e.g., CU01* to CU04* in FIG. 9B) generated by the encoder (200).

Or, the broadcasting system may comprise:

a digital signal generator means (e.g., 300 in FIG. 22) for generating adigital signal of a compressed unit data block (e.g., CU01* to CU04* inFIG. 9B) in accordance with a coding header (e.g., 0-bit to 6-bit ofrules 1 to 4 in FIGS. 5A-5D) corresponding to a continuing number (e.g.,any of 1 to 255) of the same pixel data in the data block of the onecompression unit, with a number of pixels followed (e.g., 2-bit to8-bit) indicating the continuing number (1-255) of the same pixel data,and with data (e.g., 2-bit) representing the same pixel data in the datablock of the one compression unit; and

a broadcasting means (e.g., 210 to 212 in FIG. 22) for outputting, bymeans of a radio wave or signal cable, the digital signal generated bythe digital signal generator means (300).

To achieve the above-mentioned tenth object, according to an electricmailing system of the present invention, an information integral body(e.g., PXD in FIG. 9A, or SPD in FIG. 10), formed of a plurality ofpixel data each defined by a predetermined number of bits (e.g., 2-bit),is processed so that a data block, containing the same continuous pixeldata, is compressed as one unit of compression (e.g., any of CU01 toCU04 in FIG. 9A). The electric mailing system comprises:

a compressed data generating means (e.g., 5001 to 5031 in FIG. 23) forgenerating a compressed unit data block (e.g., CU01* to CU04* in FIG.9B) in accordance with a coding header (e.g., 0-bit to 6-bit of rules 1to 4 in FIGS. 5A-5D) corresponding to a continuing number (e.g., any of1 to 255) of the same pixel data in the data block of the onecompression unit, with a number of pixels followed (e.g., 2-bit to8-bit) indicating the continuing number (1-255) of the same pixel data,and with data (e.g., 2-bit) representing the same pixel data in the datablock of the one compression unit;

a transmitter means (e.g., 5031, 600 in FIG. 23) for transmitting asignal containing the compressed unit data block (CU01* to CU04* in FIG.9B) generated by the compressed data generating means (5001 to 5031 inFIG. 23);

a receiver means (e.g., 503N in FIG. 23) for receiving the signaltransmitted by the transmitter means (5031, 600 in FIG. 23); and

a data restoration means (e.g., 501N to 503N in FIG. 23) for detectingthe coding header from the compressed unit data block (CU01* to CU04*)received by the receiver means (503N), for detecting a location of thecontinuous pixel data in accordance with a content of the detectedcoding header, for obtaining from the detected location the continuouspixel data as well as the pixel data subsequent to the continuous pixeldata, and for restoring an uncompressed pixel data block of the onecompression unit representing data which is not subjected to a datacompression by the compressed data generating means (e.g., 5001 to 5031in FIG. 23).

According to the encoding method of the present invention, three or moretypes of pixel data are compressed on the basis of at least rules 2 to 4of the following rules 1 to 6. Assume that pixel data indicatingrespective pixel dots consists of 2 bits.

Rule 1

For Continuous 1 To 3 Identical Pixel Data

One data unit consists of 4 bits. The first 2 bits represent the numberof pixels followed. The next 2 bits represent pixel data (imagecompressed data PXD).

EXAMPLE

If the number of pixels followed (e.g., "11") is one, then PXD=01.11.

If the number of pixels followed (e.g., "10") is two, then PXD=10.10.

If the number of pixels followed (e.g., "00") is three, then PXD=11.00.

Rule 2

For Continuous 4 to 15 Identical Pixel Data

One data unit consists of 8 bits. The first 2 bits are set to "00". Thesubsequent 4 bits represent the number of pixels followed. The next 2bits represent pixel data.

EXAMPLE

If the number of pixels followed (e.g., "01") five, then PXD=00.0101 01.

Rule 3

For Continuous 16 to 63 Identical Pixel Data

One data unit consists of 12 bits. The first 4 bits are set to "0000".The subsequent 6 bits represent the number of pixels followed. The next2 bits represent pixel data.

EXAMPLE

If the number of pixels followed (e.g., "10") is 16, thenPXD=0000.010000.10.

If the number of pixels followed (e.g., "11") is 46, thenPXD=0000.101110.11.

Rule 4

For Continuous 64 to 255 Identical Pixel Data:

One data unit consists of 16 bits. The first 6 bits are set to "000000".The subsequent 8 bits represent the number of pixels followed. The next2 bits represent pixel data.

EXAMPLE

If the number of pixels followed (e.g., "01") is 255, thenPXD=00000.11111111.01.

Rule 5

For Continuous Identical Pixel Data Up To The End Of Line Of Pixel DataString To Be Run-Length Coded

One data unit consists of 16 bits. The first 14 bits are set to"00000000000000". The next 2 bits represent pixel data.

EXAMPLE

If identical pixels (e.g., "00") continues to the end of a line, thenPXD=0000000000000.11.

If identical pixels (e.g., "11") continues to the end of a line, thenPXD=0000000000000.11.

Rule 6

For Non-Byte-Aligned State At The End Of Line

Four-bit dummy data "0000" is added to the end of a line.

EXAMPLE

[0/1 data string=(integer multiple of 8)-4 bits]·0000

According to the decoding method of the present invention, an originaldata before encoded is retrieved by a reverse operation of the aboveencoding rules.

Additional objects and advantages of the invention will be set forth inthe description which follows, and in part will be obvious from thedescription, or may be learned by practice of the invention. The objectsand advantages of the invention may be realized and obtained by means ofthe instrumentalities and combinations particularly pointed out in theappended claims.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of the specification, illustrate presently preferred embodiments ofthe invention and, together with the general description given above andthe detailed description of the preferred embodiments given below, serveto explain the principles of the invention.

FIGS. 1A-1C illustrate the structure of data recorded on an optical diskas an information holding medium to which the present invention isapplied;

FIGS. 2A-2B illustrate the logical structure of data to be recorded onthe optical disk in FIG. 1;

FIG. 3 is a view showing the logical structure of a sub-picture pack tobe encoded (run-length compressed), of the data structure shown in FIG.2;

FIGS. 4A-4B illustrate the contents of the sub-picture data of thesub-picture pack in FIG. 3, to which an encoding method according to anembodiment of the present invention is applied;

FIGS. 5A-5F explain compression rules 1 to 6 used in an encoding methodaccording to an embodiment of the present invention in a case whereinimage data constituting the sub-picture data portion in FIG. 4 consistsof a plurality of bits (2 bits in this case);

FIGS. 6A-6E explain compression rules 11 to 15 used in an encodingmethod according to another embodiment of the present invention in acase wherein image data constituting the sub-picture data portion inFIG. 4 consists of 1 bit;

FIGS. 7A-7C provide a detailed example of how the pixel data of eachline is encoded (i.e., run-length compressed) in a case wherein pixeldata constituting the sub-picture data portion in FIG. 4 consists of,e.g., first to ninth lines, 2-bit pixels (i.e., a maximum of four types)are arranged on each line, and character patterns "A" and "B" areexpressed by the 2-bit pixels on the respective lines;

FIGS. 8A-8C explain two examples (i.e., non-interlaced display andinterlaced display) of how the character pattern "A" of the pixel data(i.e., sub-picture data) encoded as shown in FIGS. 7A-7C is decoded;

FIGS. 9A-9B explain compression rules 1 to 6, in detail, which are usedin an encoding method according to an embodiment of the presentinvention in a case wherein image data constituting the sub-picture datain FIG. 4 consists of 2 bits;

FIG. 10 is a block diagram for explaining the flow of processing fromthe step of mass-producing a high-density optical disk having imageinformation encoded on the basis of the present invention to the step ofplaying back the information on the user side, and the flow ofprocessing from the step of broadcasting/cable-distributing of imageinformation encoded on the basis of the present invention to the step ofreceiving/playing back the information on the user/sub-picture side;

FIG. 11 is a block diagram for explaining an embodiment (non-interlacedspecification) of decoder hardware for executing image decoding(run-length expansion) according to the present invention;

FIG. 12 is a block diagram for explaining another embodiment (interlacedspecification) of decoder hardware for executing image decoding(run-length expansion) according to the present invention;

FIG. 13 is a flow chart for explaining the operations of software forthe execution of image encoding (run-length compression) according to anembodiment of the present invention, which is executed, for example, byan encoder (200) in FIG. 10;

FIG. 14 is a flow chart for explaining the contents of encoding step 1(ST806) used in the software in FIG. 13;

FIG. 15 is a flow chart for explaining software for the execution ofimage decoding (run-length expansion) according to an embodiment of thepresent invention, which is executed by an MPU (112) in FIG. 11 or 12;

FIG. 16 is a flow chart for explaining the contents of decoding step(ST1005) used in the software in FIG. 15;

FIG. 17 is a block diagram for explaining another embodiment of thedecoder hardware by which the image decoding (run-length expansion)according to the present invention is executed;

FIG. 18 is a flow chart for explaining the former processing of theimage decoding (run-length expansion) according to another embodiment ofthe present invention;

FIG. 19 is a flow chart for explaining the latter processing (subsequentto node A in FIG. 18) of the image decoding (run-length expansion)according to another embodiment of the present invention;

FIG. 20 is a flow chart for exemplifying the content of the codingheader detection step ST1205 shown in FIG. 18;

FIG. 21 is a flow chart for explaining the image decode processingaccording to the present invention, wherein the decoded image isscrolled;

FIG. 22 is a block diagram for explaining a case wherein the compresseddata, reproduced from a high-density optical disk having imageinformation encoded according to the present invention, is directlyaired or output to a cable, and the aired or cable-distributedcompressed data is decoded at the user side or at the subscriber side;

FIG. 23 is a block diagram for explaining a case wherein imageinformation encoded on the basis of the present invention is exchangedbetween two arbitrary computer users via a communication network (e.g.,an internet);

FIG. 24 shows a schematic illustration of a record/playback apparatusfor recording on an optical disk OD the image information encodedaccording to the present invention, and for playing back the recordedinformation to decode it according to the present invention;

FIG. 25 shows an example of an IC device in which the encoder of thepresent invention is integrated with its peripheral circuits;

FIG. 26 shows an example of an IC device in which the decoder of thepresent invention is integrated with its peripheral circuits; and

FIG. 27 shows an example of an IC device in which the encoder anddecoder of the present invention are integrated with their peripheralcircuits.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Encoding and decoding methods according to an embodiment of the presentinvention will be described below with reference to the accompanyingdrawings. In order to avoid a repetitive description, the same referencenumerals denote parts having the same functions throughout the drawings.

FIGS. 1A to 27 are views for explaining an image informationencoding/decoding system according to an embodiment of the presentinvention.

FIGS. 1A-1C schematically show the structure of data recorded ondouble-sided optical disk OD 1 as an information holding medium to whichthe present invention can be applied.

Optical disk OD 1 is a double-sided optical disk. Each surface of thisoptical disk has a storage capacity of about 5 Gbytes. Many recordingtracks 2 are arranged between the lead-in area 3 on the inner peripheralside of the disk and the lead-out area 4 on the outer peripheral side ofthe disk. Each track is constituted by many logical sectors 5. Variouspieces of information (compressed digital data) are stored in therespective sectors 5.

FIGS. 2A-2B show the logical structure of data to be recorded on theoptical disk in FIG. 1. More specifically, a system area in which systemdata used by disk OD is stored, a volume management information area,and a plurality of file areas are formed in the aggregate of logicalsectors in FIG. 1.

Of the plurality of file areas, for example, file 1 which is illustratedin detail in FIG. 2B contains main picture information ("VIDEO" in FIG.2), sub-picture information ("SUB-PICTURE" in FIG. 2) having contentssupplementary to the main picture information, audio information("AUDIO" in FIG. 2), playback information ("PLAYBACK INFO." in FIG. 2),and the like.

FIG. 3 shows an example of the logical structure of a sub-pictureinformation pack being subjected to the encoding (or the run-lengthcompression).

As shown at the upper portion of FIG. 3, one pack of the sub-pictureinformation contained in the video data is constituted by, for example,2048 bytes. This one pack sub-picture information includes one or moresub-picture packets subsequent to the header of the leading pack. Thefirst sub-picture packet is provided with run-length-compressedsub-picture data (SP DATA1) after its packet header. Similarly, thesecond sub-picture packet is provided with run-length-compressedsub-picture data (SP DATA2) after its packet header.

Sub-picture unit header 31 is assigned to sub-picture data unit 30 whichis obtained by gathering a plurality of sub-picture data pieces (SPDATA1, SP DATA2, . . . ). Here, the gathered sub-picture data piecesconstitute one unit of the run-length compression. Following aftersub-picture unit header 31 is pixel data 32 obtained byrun-length-compressing the picture data of one unit which is, forexample, image data on one horizontal (scanning) line of atwo-dimensional display screen.

In other words, one unit of run-length-compressed data 30 is formed of agroup of the sub-picture data pieces (SP DATA1, SP DATA2, . . . ) of oneor more sub-picture packets. In short, sub-picture data unit 30 isconstituted by sub-picture unit header 31, in which various parametersfor sub-picture displaying are recorded, and display data (compressedpixel data) 32 formed of run-length codes.

FIGS. 4A-4B show the contents of sub-picture unit header 31 in one unitof run-length compressed data 30 in FIG. 3. The data of a sub-picture(e.g., subtitles corresponding to a scene in a movie) to berecorded/transmitted (communicated) together with a main picture (e.g.,a picture of the movie) will be described below.

As will be seen from FIG. 4B, recorded in sub-picture unit header 31are: start address SPDDADR of sub-picture pixel data (display data); endaddress SPEDADR of pixel data 32; data SPDSIZE of the display-startposition and display area (width and height) of pixel data 32 withrespect to a TV display screen; background color SPCHI designated by thesystem; sub-picture color SPCINFO designated by the system; pallet colornumber SPADJINFO of an emphasizing color designated by the system;modification information SPMOD of sub-picture pixel data 32; mixingratio SPCONT of sub-picture (SP) to main-picture (MP); start-timing(corresponding to the frame number of MP) SPDST of the sub-picture; andstart addresses SPLinel to SPLineN of decode data of respective lines.

More specifically, as indicated in FIG. 4B, various parameters (e.g.,SPDDADR) having the following contents are recorded on sub-picture unitheader 31:

(1) the start address information (SPDDADR: an address relative to thebeginning of the header) of the display data (sub-picture pixel data)following the header;

(2) the end address information (SPEDADR: an address relative to thebeginning of the header) of the display data;

(3) information (SPDSIZE) indicating the display start position anddisplay range (width and height) of the display data on the monitorscreen;

(4) information (SPCHI) designated by the system and indicating thebackground color (a 16-color palette number set by a story informationtable or a display control sequence table);

(5) information designated by the system and indicating a sub-picturecolor (a 16-color palette number set by the story information table orthe display control sequence table);

(6) information (SPAJDNFO) designated by the system and indicating asub-picture emphasizing color (a color palette number set by the storyinformation table or the display control sequence table);

(7) information (SPMOD) designated by the system and specifying thesub-picture image mode information indicating either a field mode fornon-interlaced display or a frame mode for interlaced display (when thepixel data to be compressed is defined by various number of bits, thenumber of bits of this pixel data can be specified by the content ofthis mode information);

(8) information (SPCONT) designated by the system and indicating themixing ratio of the sub-picture to the main picture;

(9) information (SPDST) indicating the display start timing of thesub-picture with the frame number (e.g., an I picture frame number ofMPEG) of the main picture;

(10) information (SPlinl) indicating the start address (an addressrelative to the beginning of the sub-picture unit header) of the encodeddata on the first line of the sub-picture; and

(11) information (SPlinN)--indicating the start address (an addressrelative to the beginning of the sub-picture unit header) of the encodeddata on the Nth line of he sub-picture.

Note that information SPCONT indicating the mixing ration of thesub-picture to the main picture indicates the mixing ratio of thesub-picture with (system set value)/255, and the mixing ratio of themain picture with (255--set value)/255.

Sub-picture unit header 31 includes the start address (SPLine 1 toSPLine N) of data to be decoded on every lines. For this reason,scrolling of only the sub-picture on the display screen can be realizedby changing the designation of a decoding start line in accordance withan instruction from a microcomputer (MPU or CPU) on the decoding side.(How the scrolling is performed will be described later with referenceto FIG. 21)

A field/frame mode (SPMOD) can be recorded on sub-picture unit header 31to indicate how the sub-picture corresponds to a TV field/frame of theNTSC scheme.

In general, bit "0" is written in this field/frame mode recordingportion (SPMOD). Upon reception of sub-picture data unit 30, thedecoding side determines from bit "0" that the frame mode(non-interlaced mode) is set, and decodes the received encoded data inunits of lines. As a result, a decoded image like the one shown at thelower left position in FIG. 8 is output from the decoder. This image isdisplayed on the display screen of a monitor, a television (TV) set, orthe like.

If bit "1" is written in the field/frame mode recording portion (SPMOD),the decoding side determines that the field mode (interlaced mode) isset. In this case, after the encoded data is decoded in units of lines,the same data corresponding to two lines are consecutively output, asshown at the lower right position in FIG. 8. As a result, a framecorresponding to the TV interlaced mode can be obtained. With thisoperation, an image twice as large in amount as that in the frame mode(non-interlaced mode) can be displayed with the same data amount,although the image quality is lower than that in the frame mode.

The data length (variable length) of the pixel data (run-length data) 32of sub-picture shown in FIG. 3 or 4A is determined depending on whetherrun-length compression rules 1 to 6 in FIGS. 5A-5F or run-lengthcompression rules 11 to 15 in FIGS. 6A-6E are used.

Rules 1 to 6 in FIGS. 5A-5F are used when pixel data to be compressedhas a multi-bit configuration (2 bits in this-case). Rules 11 to 15 inFIGS. 6A-6E are used when pixel data to be compressed has a 1-bitconfiguration.

Whether run-length compression rules 1 to 6 or 11 to 15 are to be usedcan be determined by the contents (e.g., a bit width flag) of parameterSPMOD (see a portion near the middle of the table shown at the lowerportion in FIG. 4) in sub-picture unit header 31. If, for example, thebit width flag of parameter SPMOD is "1", the pixel data to berun-length compressed is 2-bit data, and hence rules 1 to 6 in FIGS.5A-5F are used. If the bit width flag of parameter SPMOD is "0", thepixel data to be run-length compressed is 1-bit data, and hence rules 11to 15 in FIGS. 6A-6E are used.

Assume that four groups A, B, C, and D of compression rules are providedrespectively for four kinds of the bit-configuration of pixel data, whenthis pixel data can optionally have the bit-configuration of either of1-bit, 2-bit, 3-bit, and 4-bit. Under this assumption, when parameterSPMOD is constituted by 2-bit flag, the 1-bit pixel data using rulegroup A can be designated by the 2-bit flag of "00". In similar manner,the 2-bit pixel data using rule group B can be designated by the 2-bitflag of "01", the 3-bit pixel data using rule group C can be designatedby the 2-bit flag of "10", and the 4-bit pixel data using rule group Dcan be designated by the 2-bit flag of "11". In this case, rules 11 to15 of FIGS. 6A-6E can be used for the compression rules of group A, andrules 1 to 6 of FIGS. 5A-5F can be used for the compression rules ofgroup B. When the contents of coding headers and the bit-configurationof pixel data, as well as the number of rules, are properly modified,the compression rules of groups C and D will be derived from rules 1 to6 of FIGS. 5A-5F.

FIGS. 5A to 5F explain the run-length compression rules 1 to 6 which areused in an encoding method according to an embodiment of the presentinvention, wherein pixel data constituting sub-picture pixel data(run-length data) 32 in FIG. 4 consists of a plurality of bits (2 bitsin this case).

FIGS. 9A-9B explain the compression rules 1 to 6, in detail, in a casewherein pixel data constituting sub-picture pixel data (run-length data)32 in FIG. 4 consists of 2 bits.

According to rule 1 in FIG. 5A, when 1 to 3 identical pixels continue insequence, one encoded (run-length compressed) data unit is constitutedby 4 bits. In this case, the first 2 bits represent the number of pixelsfollowed, and the next 2 bits represent pixel data (pixel colorinformation or the like).

For example, first compression data unit CU01 of picture data PXD beforecompressed, which is indicated in FIG. 9A, contains 2 2-bit pixel datad0, d1=(0000)b (b indicates binary data). In this case, 2 identical2-bit pixel data (00)b continue in sequence.

In this case, as indicated in FIG. 9B, 2-bit display (10)b representingthe number of pixels followed "2" is coupled to contents (00)b of thepixel data to form d0, d1=(1000)b, which is compressed data unit CU01*of picture data PXD.

In other words, (0000)b of data unit CU01 is converted into (1000)b ofdata unit CU01* according to rule 1. In this case, bit lengthcompression is not practically realized. However, for example, 3continuous identical pixels (00)b, i.e., CU01=(000000)b, are compressedinto CU01*=(1100)b. That is, the pixel data can be compressed by 2 bits.

According to rule 2 in FIG. 5B, when 4 to 15 identical pixels continue,one encoded data unit is constituted by 8 bits. In this case, the first2 bits represent a coding header indicating that encoding is performedaccording to rule 2, the subsequent 4 bits represent the number ofidentical pixels followed in sequence, and the next 2 bits represent thepixel data.

For example, second compression data unit CU02 of picture data PXDbefore being compressed, which is indicated in FIG. 9A, contains 5 2-bitpixel data d2, d3, d4, d5, d6=(0101010101)b. In this case, 5 identical2-bit pixel data (01)b continue in sequence.

In this case, as indicated in FIG. 9B, coding header (00)b, 4-bitdisplay (0101)b representing the number of pixels followed, i.e., "5",and contents (01)b of the pixel data are coupled to each other to formd2-d6=(00010101)b, which is the compressed data unit CU02* of picturedata PXD.

In other words, (0101010101)b (10-bit length) of data unit CU02 isconverted into (00010101)b (8-bit length) of data unit CU02* accordingto rule 2. In this case, the 10-bit data is compressed into the 8-bitdata, i.e., the substantial bit length compression amount corresponds toonly 2 bits. If, however, the number of pixels followed is 15 (whichcorresponds to a 30-bit length because 15 "01"s of CU02 continue insequence), the data is compressed into 8-bit data (CU02*=00111101). Thatis, 30-bit data can be compressed by 22 bits. The bit compressing effectbased on rule 2 is therefore larger than that based on rule 1. In orderto cope with run-length compression of a fine image with highresolution, rule 1 is also required.

According to rule 3 in FIG. 5C, when 16 to 63 identical pixels continue,one encoded data unit is constituted by 12 bits. In this case, the first4 bits represent a coding header indicating that encoding is performedaccording to rule 3, the subsequent 6 bits represent the number ofidentical pixels followed in sequence, and the next 2 bits representpixel data.

For example, third compression data unit CU03 of picture data PXD beforebeing compressed, which is indicated in FIG. 9A, contains 16 2-bit pixeldata d7 to d22=(101010 . . . 1010)b. In this case, 16 identical 2-bitpixel data (10)b continue.

In this case, as indicated in FIG. 9B, coding header (0000)b, 6-bitdisplay (010000)b representing the number of pixels followed "16", andcontents (10)b of the pixel data are coupled to each other to form d7 tod2=(000001000010)b, which is the compressed data unit CU03* of picturedata PXD.

In other words, (101010 . . . 1010)b (32-bit length) of data unit CU03is converted into (000001000010)b (12-bit length) of compressed dataunit CU03* according to rule 3. In this case, the 32-bit data iscompressed into the 12-bit data, i.e., the substantial bit lengthcompression amount corresponds to 20 bits. If, however, the number ofpixels followed is 63 (which corresponds to a 126-bit length because 63"10"s of CU03 continue), the data is compressed into 12-bit data(CU03*=00011111110). That is, 126-bit data can be compressed by 114bits. The bit compressing effect based on rule 3 is therefore largerthan that based on rule 2.

According to rule 4 in FIG. 5D, when 64 to 255 identical pixelscontinue, one encoded data unit is constituted by 16 bits. In this case,the first 6 bits represent a coding header indicating that encoding isperformed according to rule 4, the subsequent 8 bits represent thenumber of identical pixels followed, and the next 2 bits represent pixeldata.

For example, fourth compression data unit CU04 of picture data PXDbefore compressed, which is indicated in FIG. 9A, contains 69 2-bitpixel data d23 to d91=(111111 . . . 1111)b. In this case, 69 identical2-bit pixel data (11)b continue in sequence.

In this case, as indicated by the lower portion in FIG. 9, coding header(000000)b, 8-bit display (00100101)b representing the number ofidentical pixels followed "69", and contents (11)b of the pixel data arecoupled to each other to form d23 to d91=(0000000010010111)b, which iscompressed data unit CU04* of picture data PXD.

In other words, (111111 . . . 1111)b (138-bit length) of data unit CU04is converted into (0000000010010111)b (16-bit length) of compressed dataunit CU04* according to rule 4. In this case, the 138-bit data iscompressed into the 16-bit data, i.e., the substantial bit lengthcompression amount corresponds to 122 bits. If, however, the number ofpixels followed is 255 (which corresponds to a 510-bit length because255 "11"s of CU04 continue), the data is compressed into 16-bit data(CU04*=0000001111111111). That is, 510-bit data can be compressed by 494bits. The bit compressing effect based on rule 4 is therefore largerthan that based on rule 3.

According to rule 5 in FIG. 5E, when identical pixels continue from aswitching point of a data unit of encoding to the end of a line, oneencoded data unit is constituted by 16 bits. In this case, the first 14bits represent a coding header indicating that encoding is performedaccording to rule 5, and the next 2 bits represent the pixel data.

For example, fourth compression data unit CU05 of picture data PXDbefore being compressed, which is indicated in FIG. 9A, contains one ormore 2-bit pixel data d92 to dn=(000000 . . . 0000)b. In this case, afinite number of identical 2-bit pixel data (00)b continue. According torule 5, however, the number of pixels followed may be 1 or more.

In this case, as indicated in FIG. 9B, coding header (00000000000000)bis coupled to the contents (00)b of the pixel data to form d92 todn=(0000000000000000)b, which is a compressed data unit CU05* of picturedata PXD.

In other words, (000000 . . . 0000)b (unspecified bit length) of dataunit CU05 is converted into (0000000000000000)b (16-bit length) of dataunit CU05* according to rule 5. According to rule 5, if the number ofidentical and sequential pixels up to the end of a line is 16 or more, acompressing effect can be obtained.

According to rule 6 in FIG. 5F, if the length of 1-line compressed dataPXD is not an integer multiple of 8 bits (i.e., not byte-aligned) at theend of a pixel line on which data to be encoded are arranged, 4-bitdummy data is added to the 1-line compressed data to make 1-linecompressed data PXD coincide with a byte unit (i.e., for byte-aligning).

For example, the total bit length of data units CU01* to CU05* ofpicture data PXD after being compressed, which is indicated by the lowerportion in FIG. 9, is always an integer multiple of 4 bits. However,this length is not always an integer multiple of 8 bits.

If, for example, the total bit length of data units CU01* to CU05* is1020, and 4 bits are required for byte-aligning. Therefore, 4-bit dummydata CU06*=(0000)b is added to the end of the 1020-bit data to outputdata units CU01* to CU06* as byte-aligned 1024-bit data.

Note that 2-bit pixel data is not limited to data representing fourtypes of pixel colors. For example, pixel data (00)b may represent abackground pixel of a sub-picture; pixel data (01)b, a pattern pixel ofthe sub-picture; pixel data (10)b, the first emphasizing pixel of thesub-picture, and pixel data (11)b, the second emphasizing pixel of thesub-picture.

As the number of bits constituting pixel data becomes larger, more typesof sub-picture pixels can be designated. If, for example, pixel data isconstituted by 3-bit data (000)b to (111)b, a maximum of eight types ofpixel colors+pixel types (emphasizing effects) can be designated insub-picture data to be run-length encoded/decoded.

FIGS. 6A-6E explain the run-length compression rules 11 to 15 which areused in an encoding method according to another embodiment of thepresent invention, wherein pixel data constituting sub-picture pixeldata (run-length data) 32 in FIG. 4 consists of one bit. According torule 11 in FIG. 6A, when 1 to 7 identical pixels continue, one encoded(run-length compressed) data unit is constituted by 4 bits. In thiscase, the first 3 bits represent the number of pixels followed, and thenext 1 bit represents pixel data information such as a pixel type). If,for example, 1-bit pixel data "0", it indicates a background pixel of asub-picture. If this data is "1", it indicates a pattern pixel of thesub-picture.

According to rule 12 in FIG. 6B, when 8 to 15 identical pixels continue,one encoded data unit is constituted by 8 bits. In this case, the first3 bits represent a coding header (e.g., 0000 indicating that encoding isbased on rule 12, the subsequent 4 bits represent the number of pixelsfollowed, and the next 1 bit represents pixel data.

According to rule 13 in FIG. 6C, when 16 to 127 identical pixelscontinue, one encoded data unit is constituted by 12 bits. In this case,the first 4 bits represent a coding header (e.g., 0000) indicating thatencoding is based on rule 13, the subsequent 7 bits represent the numberof pixels followed, and the next 1 bit represents pixel data.

According to rule 14 in FIG. 6D, when identical pixels continue from aswitching point of a data unit of encoding to the end of a line, oneencoded data unit is constituted by 8 bits. In this case, the first 7bits represent a coding header (e.g., 0000000) indicating that encodingis performed according to rule 14, and the next 1 bit represents pixeldata.

According to rule 15 in FIG. 6E, if the length of 1-line compressed dataPXD is not an integer multiple of 8 bits (i.e., not byte-aligned) at theend of a pixel line on which data to be encoded are arranged, 4-bitdummy data is added to the 1-line compressed data to make 1-linecompressed data PXD coincide with a byte unit (i.e., for byte-aligning).

An image encoding method (an encoding method using run-length coding)will be described in detail next with reference to FIGS. 7A-7C.

FIG. 7A shows a case wherein pixel data constituting sub-picture pixeldata (run-length data) 32 in FIG. 4 is constituted by the first to ninthlines, 2-bit pixels (having a maximum of four types of contents) arearranged on each line, and character patterns "A" and "B" are expressedby the 2-bit pixels on the respective lines. The manner of encoding(run-length compressing) the pixel data on each line will be describedin detail below.

As indicated in FIG. 7A, an image as a source is constituted by threetypes (a maximum of four types) of pixel data. That is, 2-bit image data(00)b represents the pixel color of the background of the sub-picture;2-bit image data (01)b, the pixel color of characters "A" and "B" in thesub-picture; and 2-bit image data (10)b, an emphasizing pixel color withrespect to sub-picture characters "A" and "B".

When the original image containing characters "A" and "B" is scanned bya scanner or the like, these character patterns are read, from the leftto right of each scanning line, in units of pixels. The picture dataread in this manner is input to an encoder (denoted by reference numeral200 in the embodiment in FIG. 10 which will be described later) forperforming run-length compression based on the present invention.

This encoder can be constituted by a microcomputer (MPU or CPU) in whichsoftware for executing run-length compression based on rules 1 to 6described with reference to FIGS. 5A-5F runs. This encoder software willbe described later with reference to the flow charts in FIGS. 13 and 14.

Encoding processing of run-length compressing a sequential bit string ofcharacter pattern "A" and "B" read in units of pixels will be describedbelow.

In the case shown in FIG. 7A, a source image is assumed to have threecolor pixels. More specifically, in picture data (the sequential bitstring of character patterns "A" and "B") to be encoded, backgroundcolor pixel "" is represented by 2-bit pixel data (00)b, charactercolor pixel "#" is represented by 2-bit pixel data (01)b, andemphasizing color pixel "◯" is represented by 2-bit pixel data (10)b.The bit count (=2) of pixel data (e.g., 00 or 01) is also called a pixelwidth.

For the sake of simplicity, in the case shown in FIG. 7A, the displaywidth of picture data (sub-picture data) to be encoded is set to be 16pixels, and the number of scanning lines (display height) is set to be 9lines.

Image data (sub-picture data) obtained from a scanner is temporarilyconverted into a run-length value by the microcomputer.

Consider the first line in FIG. 7A. Three continuous pixels "" areconverted into (*3); subsequent 1 pixel "0", (0*1); subsequent 1 pixel"#", (#*1); subsequent 1 pixel "◯", (◯*1); subsequent continuous 3pixels "", (*3); subsequent 1 pixel "◯", (◯*1); subsequentcontinuous 4 pixels "###", (#*4); subsequent 1 pixel "◯", (!{*1); andlast 1 pixel "", (*1).

As a result, as indicated in FIG. 7B, the run-length data (beforecompressed) on the first line becomes"*3/◯*1/#*1/◯*1/.*3/.largecircle.*1/#*4/◯*1/*1". This data isconstituted by a combination of image information such as a charactercolor pixel, and the number of pixels followed which represents acontinuation count.

Similarly, the pixel data strings on the second to ninth lines indicatedin FIG. 7A become the run-length data strings on the second to ninthlines indicated in FIG. 7B.

Consider the data on the first line. Since 3 background color pixels"⊙" continue from the start of the line, compression rule 1 in FIG. 5Ais used. As a result, first three pixels "", i.e., (*3), on thefirst line are encoded into (1100), which is a combination of 2 bits(11) representing "3" and (00) representing background color pixel "".

Since the next data on the first line is 1 pixel "◯", rule 1 is used. Asa result, next pixel "◯", i.e., (◯*1), on the first line is encoded into(0110), which is a combination of 2 bits (01) representing "1" and (10)representing emphasizing color pixel " ".

Since the next data is 1 pixel "#", rule 1 is used. As a result, nextpixel "#", i.e., (#*1), on the first line is encoded into (0101), whichis a combination of 2 bits (01) representing "1" and (01) representingcharacter color pixel "#" (the portions corresponding to pixels "### . .. " are enclosed with the broken lines in FIGS. 7B-7C).

Similarly, (◯*1) is encoded into (0110); (*3), (1100); and (◯*1),(0110).

Since the subsequent data on the first line are 4 pixels "###",compression rule 2 in FIG. 5B is used. As a result, pixels "####", i.e.,(#*4), on the first line are encoded into (00010001), which is acombination of 2-bit header (00) representing that rule 2 is used, 4bits (0100) representing the number of pixels followed "4", and (01)representing character color pixel "#" (the portions corresponding to"#" are enclosed with the broken lines in FIGS. 7B-7C).

Since the subsequent data on the first line is 1 pixel "◯", rule 1 isused. As a result, pixel "◯" , i.e., (◯*1), is encoded into (0110),which is a combination of 2 bits (01) representing "1" and (10)representing emphasizing color pixel "◯".

Since the last data on the first line is 1 "", rule 1 is used. As aresult, pixel "", i.e., (*1), is encoded into (0100), which is acombination of 2 bits (01) representing "1" and (00) representingbackground color pixel "".

In the above manner, run-length data"*3/◯*1/#*1/◯*1/*3/.largecircle.*1/#*4/◯*1/*1" (before compressed) onthe first line is run-length compressed into (1100) (0110) (0101) (0110)(1100) (0110) (00010001) (0110) (0100), thereby completing the encodingof the first line.

In the same manner as described above, encoding proceeds up to theeighth line. All the data on the ninth line are identical backgroundcolor pixels " . . . " In this case, compression rule 5 in FIG. 5E isused. As a result, run-length data "*16" (before compressed) on theninth line is encoded into 16-bit data (000000000000000), which is acombination of 14-bit header (00000000000000) representing thatidentical background color pixels " . . . " continue to the end ofthe line and 2-bit pixel data (00) representing background color pixel"".

Note that encoding based on rule 5 is used when data to be compressedstarts midway along a line and continues to the end of the line.

FIG. 10 is a block diagram for explaining the flow of processing fromthe step of mass-producing high-density optical disks having imageinformation encoded on the basis of the present invention to the step ofplaying back the information on the user side, together with the flow ofprocessing from the step of broadcasting/cable-distributing imageinformation encoded on the basis of the present invention to the step ofreceiving/playing back the information on the user/subscriber side.

Assume that run-length data before compressed like the one shown in FIG.7B is input to encoder 200 in FIG. 10. Encoder 200 performs run-lengthcompression (encoding) of the input data by software processing based oncompression rules 1 to 6 in FIGS. 5A-5F.

When data of a logic structure like the one shown in FIG. 2 is to berecorded on optical disk OD in FIG. 1, encoder 200 in FIG. 10 performsrun-length compression processing (encoding processing) with respect tosub-picture data in FIG. 3.

Various data required to complete optical disk OD are also input toencoder 200 in FIG. 10. These data are compressed on the basis of, e.g.,the standards of MPEG (Motion Picture Expert Group), and the compresseddigital data are sent to laser cutting machine 202 ormodulator/transmitter 210.

In laser cutting machine 202, the MPEG-compressed data from encoder 200is recorded on a mother disk (not shown) to manufacture optical diskmaster 204.

In two-sided high-density optical disk production plant 206, theinformation of master 204 is transferred onto, e.g., a laser beamreflecting film on a 0.6-mm thick polycarbonate base. Two large-capacitypolycarbonate base on which different pieces of master information arerespectively transferred are joined to each other to form a 1.2-mm thicktwo-sided optical disk (or a two-sided disk having one information readsurface).

Double-sided high-density optical disks OD mass-produced by plant 206are distributed to various types of markets and to users.

Distributed disk OD is played back by disk player 300 of the user. Diskplayer 300 includes decoder 101 for decoding data encoded by encoder 200into original information. The information decoded by decoder 101 issent to, e.g., a monitor TV of the user to be visualized. In thismanner, the end user can enjoy the original picture information fromlarge-capacity disk OD.

The compressed information sent from encoder 200 tomodulator/transmitter 210 is modulated in accordance with predeterminedstandards and transmitted. For example, the compressed pictureinformation from encoder 200 is broadcasted through a satellite (212),through corresponding audio information. Alternatively, the compressedpicture information from encoder 200 is transmitted through a cable(212), together with corresponding audio information.

The compressed picture/audio information broadcasted or transmittedthrough the cable is received by receiver/demodulator 400 of a user orsubscriber. Receiver/demodulator 400 includes decoder 101 for decodingthe data encoded by encoder 200 into the original information. Theinformation decoded by decoder 101 is sent to, e.g., the monitor TV ofthe user to be visualized. In this manner, the end user can enjoy theoriginal picture information from the compressed picture informationbroadcasted or transmitted through the cable.

FIG. 11 is a block diagram showing an embodiment (non-interlacedspecification) of decoder hardware for executing image decoding(run-length expansion) based on the present invention. Decoder 101 (seeFIG. 10) for decoding run-length compressed sub-picture data SPD(corresponding to data 32 in FIG. 3) can have an arrangement like theone shown in FIG. 11.

A sub-picture data decoder for run-length expanding a signal containingrun-length compressed pixel data having a format like the one shown inFIG. 4 will be described below with reference to FIG. 11.

As shown in FIG. 11, decoder 101 comprises data I/O 102 to whichsub-picture data SPD is input; memory 108 retaining sub-picture dataSPD; memory control 105 for controlling the read operation of memory108; continuous code length detector 106 for detecting the continuouscode length (coding header) of one unit (one block) from the runinformation of encoded data (run-length compressed pixel data) read outfrom memory 108, so as to output separation information for thecontinuous code length; coding data separator 103 for extractingone-block encoded data in accordance with the information fromcontinuous code length detector 106; run-length setter 107 for receivinga signal output from coding data separator 103 and representing the runinformation of one compression unit, together with a signal (periodsignal) output from continuous code length detector 106 and indicatingthe number of continuous bits "0"s, i.e., the number of data bits "0"scontinuing from the start of the coding data of one block, andcalculating the number of pixels followed in one block from thesesignals; pix. color out-stage 104 (Fast-in/Fast-out type) for receivingpixel color information from coding data separator 103 and the periodsignal output from run-length setter 107 and outputting the colorinformation only for the corresponding interval; microcomputer 112 forloading the header data (see FIG. 4) in sub-picture data SPD read outfrom memory 108, and performing various types of processing settings andcontrol operations on the basis of the loaded data; address control 109for controlling the read/write addresses of memory 108; insufficientpix. color setter 111 in which color information corresponding to a lineon which no run information is present is set by microcomputer 112; anddisplay activator 110 for determining a display area, of a TV screen orthe like, in which a sub-picture is to be displayed.

In other words, as described in FIG. 11, run-length compressedsub-picture data SPD is sent to the internal bus of decoder 101 throughdata I/O 102. Sub-picture data SPD sent to the bus is supplied to memory108 through memory control 105 to be stored therein. The internal bus ofdecoder 101 is connected to coding data separator 103, continuous codelength detector 106, and microcomputer (MPU or CPU) 112.

Sub-picture unit header 31 of the sub-picture data obtained from memory108 is read by microcomputer 112. Microcomputer 112 detects the variousparameters shown in FIG. 4 from read sub-picture unit header 31. Inaccordance with the detected parameters, the start address of decoding(SPDDADR) is set at address controller 109; display activator 110receives information (SPDSIZE) indicating the display start position,display width, and display height of the sub-picture; and coding dataseparator 103 receives display width (or the number of dots of the line)of the sub-picture. The parameters detected by microcomputer 112 arethen stored in the internal registers of respective circuit blocks (109,110, and 103). Thereafter, microcomputer 112 can access the parametersstored in the circuit blocks (109, 110, and 103).

Address controller 109 accesses memory 108 through memory controller 105in response to the starting address (SPDDADR) of decoding set at theregister of controller 109, so that the reading of the sub-picture datato be decoded starts. The sub-picture data read from memory 108 issupplied to coding data separator 103 and to continuous code lengthdetector 106.

The coding header (2 to 14 bits according to rules 2 to 5 in FIGS.5B-5E) of run-length compressed sub-picture data SPD is detected bycontinuous code length detector 106. The number of continuous pixels ofidentical pixel data in sub-picture data SPD is detected by run-lengthsetter 107 based on a signal from continuous code length detector 106.

More specifically, continuous code length detector 106 counts the numberof bits of "0" in the data read from memory 108 in order to detect thecoding header (cf. FIGS. 5A-5F). In accordance with the value or contentof the detected coding header, detector 106 supplies separationinformation SEP.INFO. to coding data separator 103.

In response to separation information SEP.INFO., coding data separator103 sets the continuous pixel numbers (run information) at run lengthsetter 107. At the same time, separator 103 sets the pixel data(separated data indicating the pixel color) at pixel color output stage104 of a FIFO (first-in/first-out) type. In this case, coding dataseparator 103 counts the pixel number of the sub-picture data, andcompares the counted pixel number with the display width (or the numberof pixels on one line) of the sub-picture.

Here, if no byte-aligning is established when the decoding of one lineis completed (or if the bit length of one line data is not the integralof the unit of number "8"), coding data separator 103 discards orneglects the trailing 4-bit data on the line, regarding as the dummydata added at the time of encoding.

Run-length setter 107 supplies pixel color output stage 104 with aPERIOD SIGNAL for outputting the pixel data, based on the continuouspixel number (run information), pixel dot clock DOTCLK, andhorizontal/vertical sync signals H-SYNC/V-SYNC. Pixel color output stage104 outputs the pixel data from coding data separator 103, as thedecoded display data, during the active period of the pixel data outputsignal (PERIOD SIGNAL), or during the period of outputting the samepixel color.

Within the above-mentioned active period of the PERIOD SIGNAL, if thestart line of decoding is changed by the instruction from microcomputer112, a certain line(s) having no run information could exists. When theno-run-information line(s) is(are) found during the decoding,insufficient pixel color setter 111 sends data (COLOR INFO.) of presetinsufficient pixel color to pixel color output stage 104. Then, pixelcolor output stage 104 outputs the data (COLOR INFO.) of theinsufficient pixel color from insufficient pixel color setter 111, solong as the no-run-information line(s) is(are) input to coding dataseparator 103.

More specifically, in the case of decoder 101 in FIG. 11, if inputsub-picture data SPD includes no image data, microcomputer 112 setspixel color information as shortage data in insufficient pix. colorsetter 111.

A display enable signal for determining a specific position on a monitorscreen (not shown) at which a decoded sub-picture is to be displayed issupplied from display activator 110 to pix. color out-stage 104 insynchronism with a horizontal/vertical sync signal for a sub-pictureimage. Display activator 110 sends a color switching signal to pix.color out-stage 104 in accordance with a color information instructionfrom microcomputer 112.

After the processing settings of microcomputer 112, address control 109sends address data and various timing signals to memory control 105,continuous code length detector 106, coding data separator 103, andrun-length setter 107.

When a pack of sub-picture data SPD is received through data I/O 102 andstored in memory 108, microcomputer 112 reads the contents of the packheader of data SPD (e.g., a start address of decoding, an end address ofdecoding, a display start position, a display width, and a displayheight). Microcomputer 112 sets a start address of decoding, an endaddress of decoding, a display start position, a display width, adisplay height, and the like in display activator 110 on the basis ofthe read contents. At this time, a specific bit configuration ofcompressed pixel data (2-bit pixel data in this case) can be determinedby the contents of sub-picture unit header 31 in FIG. 4.

The operation of decoder 101 in a case wherein compressed pixel data hasa 2-bit configuration (rules 1 to 6 in FIGS. 5A-5F are used) will bedescribed.

When the start address decoding is set by microcomputer 112, addresscontrol 109 sends corresponding address data to memory control 105, anda read start signal to continuous code length detector 106.

In response to the sent read start signal, continuous code lengthdetector 106 sends a read signal to memory control 105 to load encodeddata (compressed sub-picture data 32). Continuous code length detector106 then checks whether all the upper 2 bits of the read data are "0"s.

If all the bits are not "0"s, it is determined that the block length ofthe unit of compression is 4 bits (see rule 1 in FIG. 5A).

If the bits (upper 2 bits) are "0"s, the subsequent 2 bits (upper 4bits) are checked. If they are not "0"s, it is determined that the blocklength of the unit of compression is 8 bits (see rule 2 in FIG. 5B).

If the bits (upper 4 bits) are "0"s, the subsequent 2 bits (upper 6bits) are checked. If they are not "0"s, it is determined that the blocklength of the unit of compression is 12 bits (see rule 3 in FIG. 5C).

If the bits (upper 6 bits) are "0"s, the subsequent 8 bits (upper 14bits) are further checked. If they are not "0"s, it is determined thatthe block length of the unit of compression is 16 bits (see rule 4 inFIG. 5D).

If the bits (upper 14 bits) are "0"s, it is determined that the blocklength of the unit of compression is 16 bits, and identical pixel datacontinue up to the end of the line (see rule 5 in FIG. 5E).

If the number of bits of the pixel data read up to the end of the lineis an integer multiple of 8, the pixel data is used as it is. If thenumber of bits is not an integer multiple of 8, it is determined that4-bit dummy data is required at the end of the read data to realizebyte-aligning (see rule 6 in FIG. 5F).

Coding data separator 103 extracts 1-block data (the unit ofcompression) of sub-picture data 32 from memory 108 on the basis of theabove determination result obtained by continuous code length detector106. Coding data separator 103 separates the extracted 1-block data intothe number of pixels followed and pixel data (e.g., pixel colorinformation). The separated data of the number of pixels followed (RUNINFO.) is sent to run-length setter 107, and the separated pixel data(SEPARATED DATA) is sent to pix. color out-stage 104.

Display activator 110 generates a display enable signal (enable signal)for designating a sub-picture display interval in synchronism with apixel dot clock (PIXEL-DOT CLK), a horizontal sync signal (H-SYNC), anda vertical sync signal (V-SYNC) in accordance with the display startposition information, the display width information, and the displayheight information received from microcomputer 112. This display enablesignal is output to run-length setter 107.

Run-length setter 107 receives a signal output from continuous codelength detector 106 and indicating whether the current block datacontinues to the line end, and continuous pixel data (RUN INFO.) fromcoding data separator 103. On the basis of the signal from continuouscode length detector 106 and the data from coding data separator 103,run-length setter 107 determines the number of pixel dots of a blockwhich is being decoded, and outputs a display enable signal (outputenable signal) to pix. color out-stage 104 during an intervalcorresponding to the number of dots.

Pix. color out-stage 104 is enabled during an interval in which anperiod signal is received from run-length setter 107. In this interval,pix. color out-stage 104 sends the pixel color information received fromcoding data separator 103, as decoded display data, to a display unit(not shown) in synchronism with the pixel dot clock (PIXEL-DOT CLK).That is, pix. color out-stage 104 outputs the same display datacorresponding to the pixel pattern continuous dots of the block which isbeing decoded.

Upon determining that the encoded data are identical pixel color datacontinuing to the line end, continuous code length detector 106 outputsa signal for a continuous code length of 16 bits to coding dataseparator 103, and also output, to run-length setter 107, a signalindicating that identical pixel data continue up to the line end.

Upon reception of the above signal from continuous code length detector106, run-length setter 107 outputs an output enable signal (periodsignal) to pix. color out-stage 104 to keep the color information of theencoded data in an enable state until horizontal sync signal H-SYNC isinactivated.

When microcomputer 112 changes the start line of decoding to scroll thedisplayed contents of a sub-picture, no data line used for decoding maybe present in a preset display area (i.e., a decoding line shortage mayoccur).

In decoder 101 in FIG. 11, in order to cope with such a case, pixelcolor data for compensating for a line shortage is prepared in advance.When a line shortage is actually detected, the current display mode isswitched to an insufficient pixel color data display mode. Morespecifically, when a data end signal is supplied from address control109 to display activator 110, display activator 110 sends a colorswitching signal (COLOR SW SIGNAL) to pix. color out-stage 104. Inresponse to this switching signal, pix. color out-stage 104 switches themode of outputting decoded pixel color data from the encoded data to themode of outputting decoded color information (COLOR INFO. ) from displayactivator 110. This switched state is kept during an insufficient linedisplay interval (DISPLAY ENABLE=active).

When the above line shortage occurs, a decoding operation may be stoppedinstead of using insufficient pixel color data.

More specifically, when, for example, a data end signal is input fromaddress control 109 to display activator 110, a color switching signalfor designating a display stop may be output from display activator 110to pix. color out-stage 104. Pix. color out-stage 104 keeps stopping thedisplay of a sub-picture during an interval in which this display stopdesignation color switching signal is active.

FIGS. 8A-8C show two display modes (non-interlaced display andinterlaced display) to explain how character pattern "A" of the pixeldata (sub-picture data) encoded in FIGS. 7A-7C is decoded.

Decoder 101 in FIG. 11 can be used to decode compressed data like theone shown in FIG. 8A into interlaced display data like the one shown inFIG. 8B.

In contrast to this, when compressed data like the one shown in FIG. 8Ais to be decoded into interlaced display data shown in FIG. 8C, a linedoubler for scanning the same pixel line twice (e.g., re-scanning line#10, in an even field, which has the same contents as those of line #1in an odd field; switching in units of V-SYNC pulses) is required.

When an image display amount-equivalent to that in the interlaceddisplay mode is to be displayed in the non-interlaced display mode,another line doubler (e.g., line #10 having the same contents as thoseof line #1 at the lower end portion in FIG. 8C) is made to follow line#1; switching in units of H-SYNC pulses.

FIG. 12 is a block diagram for explaining an embodiment (interlacedspecifications) of decoder hardware having the above line doublerfunction. Decoder 101 in FIG. 10 may be constituted by a decoder havingthe arrangement shown in FIG. 12.

In the arrangement in FIG. 12, microcomputer 112 detects the generationtimings of odd and even fields in the interlaced display mode on thebasis of a horizontal/vertical sync signal for a sub-picture.

Upon detection of an odd field, microcomputer 112 supplies, to selectsignal generator 118, a mode signal indicating that the current field isan odd field. As a result, select signal generator 118 outputs a signalto selector 115 to select decoded data from decoder 101. Decoder 101then outputs the pixel data (see FIG. 8C) of lines #1 to #9 in the oddfield, as an video output, to an external unit through selector 115. Inthis case, the pixel data of lines #1 to #9 in the odd field aretemporarily stored in line memory 114.

Upon detecting that the odd field has shifted to an even field,microcomputer 112 supplies, to select signal generator 118, a modesignal indicating that the current field is an even field. As a result,select signal generator 118 outputs a signal to selector 115 to selectthe data stored in line memory 114. Line memory 114 then outputs thepixel data (see FIG. 8C) of lines #10 to #18 in the even field, as avideo output, to the external unit through selector 115.

In this manner, the sub-picture image (character "A" in FIG. 8C) oflines #1 to #9 in the odd field is synthesized with the sub-pictureimage (character "A" in FIG. 8C) of lines 10# to #18 in the even field,thereby realizing interlaced display.

Note that sub-picture unit header 31 of the sub-picture data in FIG. 4includes a parameter bit (SPMOD) indicating a frame display mode/fielddisplay mode for a TV screen.

For example, an image display amount equivalent to that in theinterlaced display mode is displayed in the non-interlaced display modein the following manner.

Upon loading sub-picture unit header 31, microcomputer 112 in FIG. 12can determine from the set value of parameter SPMOD (active="1";inactive="0") whether the interlaced mode (active "1") or thenon-interlaced mode (inactive "0") is set.

In the arrangement in FIG. 12, if parameter SPMOD is active "1",microcomputer 112 detects that the interlaced mode is set, and sends amode signal indicating the interlaced mode to select signal generator118. Select signal generator 118 supplies a switching signal to selector115 every time horizontal sync signal H-SYNC is generated. Selector 115alternately switches the decoded output (decoded data) of the currentfield from decoder 101 and the decoded output of the current fieldtemporarily stored in line memory 114 every time horizontal sync signalH-SYNC is generated, and outputs a video output to an external TV set orthe like.

When the current decoded data and the decoded data in line memory 114are switched for each H-SYNC, a picture having a density (the number ofhorizontal scanning lines) twice that of the original image (decodeddata) is displayed on the TV screen in the interlaced mode.

In decoder 101 having the above arrangement, sequentially input bit dataare read by 2 to 16 bits while being counted bit by bit from thebeginning of a decoded data unit block, and are decoded, instead ofbeing decoded after read by one line. In this case, the bit length (4bits, 8 bits, 12 bits, 16 bits, or the like) of one decoded data unit isdetected immediately before a decoding operation. For example,compressed pixel data is decoded (played back) into three types ofpixels ("", "◯" and "#" in FIG. 7) in real time in the unit of thedetected data length.

In decoding pixel data encoded according to rules 1 to 6 in FIGS. 5A-5F,decoder 101 may have a bit counter and a data buffer (line memory 114 orthe like) having a relatively small capacity. In other words, thecircuit arrangement of decoder 101 can be relatively simplified, and theoverall apparatus including this encoder can be reduced in size.

That is, the encoder of the present invention requires no large codetable in the coder unlike in the conventional MH coding method, and neednot read the same data twice in an encoding operation unlike in thearithmetic coding method. In addition, the decoder of the presentinvention requires no relatively complicated hardware like a multiplier,and can be realized by adding simple circuits such as a counter and asmall-capacity buffer.

According to the present invention, run-length compression/encoding andrun-length expansion/decoding of many types of pixel data (a maximum offour types of pixel data each having a 2-bit configuration) can berealized with a relatively simple arrangement.

FIG. 13 is a flow chart for executing image encoding (run-lengthcompression) according to an embodiment of the present invention and forexplaining software executed by the encoder (200) in FIG. 10.

A series of encoding operations based on rules 1 to 6 in FIGS. 5A-5F isexecuted, as software processing, by the microcomputer in encoder 200 inFIG. 10. The overall encoding processing can be performed by encoder 200in accordance with the flow chart in FIG. 13. Run-length compression ofimage data in sub-picture data can be performed in accordance with theflow chart in FIG. 14.

In this case, when the number of lines and the number of dots of imagedata are designated by a key input operation (step ST801), the computerin the encoder 200 prepares a header area for sub-picture data, andinitializes the line count to "0" (step ST802).

When an image pattern is sequentially input in units of bits, thecomputer in the encoder 200 obtains the first 1-pixel data (2 bits inthis case), and stores the pixel data. In addition, the computerinitializes the pixel count to "1", and the dot count to "1" (stepST803).

Subsequently, the computer in encoder 200 obtains the next pixel data (2bits) of the pixel pattern, and compares it with the stored precedingimage data (step ST804).

If it is determined from the comparison result that the pixel data donot match each other (NO in step ST805), encoding 1 is performed (stepST806), and the current pixel data is stored (step ST807). The pixelcount is then incremented by one, and the dot count is also incrementedby one accordingly (step ST808).

If it is determined from the comparison result that the pixel data matcheach other (YES in step ST805), encoding 1 in step ST806 is skipped, andthe flow advances to step ST808.

After the pixel count and the dot count are incremented (step ST808),the computer in encoder 200 checks whether a pixel line which iscurrently encoded is the end of a pixel line (step 809). If the pixelline is the end of the line (YES in step ST809), encoding 2 is performed(step ST810). If the pixel line is not the end of the line (NO in stepST809), the flow returns to step ST840, and the processing in stepsST804 to ST808 is repeated.

Upon completion of encoding 2 in step ST810, the computer in encoder 200checks whether a bit string after encoding is an integer multiple of 8bits (byte-aligned) (step ST811A). If the bit string is not byte-aligned(NO in step ST811A), 4-bit dummy data (0000) is added to the end of thebit string after encoding (step ST811B). After this dummy additionprocessing, or if the bit string after encoding is byte-aligned (YES instep ST811A), the line counter of the computer in the encoder (e.g., thegeneral-purpose register in the microcomputer) is incremented by one(step ST812).

If the current line is not the final line (NO in step ST813) after theline counter is incremented, the flow returns to step ST803, and theprocessing in steps ST803 to ST812 is repeated.

If the current line is the final line (YES in step ST813) after the linecounter is incremented, the encoding processing (run-length compressionof the bit string of the 2-bit pixel data) is completed.

FIG. 14 is a flow chart for explaining the contents of encoding 1 (stepST806) in FIG. 13.

In encoding 1 (step ST806) in FIG. 13, pixel data to be encoded isassumed to have a 2-bit width, and hence run-length compression rules 1to 6 in FIG. 5 are used.

In correspondence with rules 1 to 6, computer software is executed todetermine whether the pixel count is 0 (step ST901), 1 to 3 (stepST902), 4 to 15 (step ST903), 16 to 63 (step ST904), or 64 to 255 (stepST905), or indicates the end of a line (step ST906), or is 256 or more(step ST907).

The computer in encoder 200 determines the number of run field bits (oneunit length of identical pixel data) on the basis of the abovedetermination result (steps ST908 to ST913), and ensure an areacorresponding to the determined number of run field bits aftersub-picture unit header 31. The number of pixels followed is output tothe run field ensured in this manner, and the pixel data is output tothe pixel field. These data are recorded in a memory unit (not shown) inencoder 200 (step ST914).

FIG. 15 is a flow chart for executing image decoding (run-lengthexpansion) according to an embodiment of the present invention, and forexplaining software executed by microcomputer 112 in FIG. 11 or 12

FIG. 16 is a flow chart for explaining the contents of the decoding step(step ST1005) used in the software in FIG. 15.

Microcomputer 112 loads first header 31 of run-length compressedsub-picture data (pixel data has a 2-bit configuration), and analyzesits contents (see FIG. 4). The data is then decoded on the basis of theanalyzed contents of the header. The number of lines and the number ofdots of the data are designated. When the number of lines and the numberof dots are designated (step ST1001), the line count and the dot countare initialized to "0" (steps ST1002 and ST103).

Microcomputer 112 sequentially receives the data bit string followingsub-picture unit header 31, and counts the number of dots and the dotcount. Microcomputer 112 then subtracts the dot count from the number ofdots to obtain the number of pixels followed (step ST1004).

Upon calculating the number of pixels followed in this manner,microcomputer 112 executes decoding in accordance with the number ofpixels followed (step ST1005).

After the decoding processing in step ST1005, microcomputer 112 adds thedot count to the number of pixels followed to obtain a new dot count(step ST1006).

Microcomputer 112 sequentially loads data and executes the decodingprocessing in step ST1005. When the accumulated dot count coincides withthe initially set line end count (the position of the end of the line),microcomputer 112 terminates decoding processing for 1-line data (YES instep ST1007).

If the decoded data is byte-aligned (YES in step ST1008A), dummy data isremoved (step ST1008B). The line count is then incremented by one (stepST1009). The processing in steps ST1002 to ST1009 is repeated until thefinal line (NO in step ST1010). If the current line is the final line(YES in step ST1010), the decoding processing is terminated.

For example, FIG. 16 shows the contents of the decoding processing instep ST1005 in FIG. 15.

From the beginning of this processing, 2 bits are obtained, and it ischecked whether the bits are "0". This determination step is repeated(steps ST1101 to ST1109). With this processing, the number of pixelsfollowed, i.e., the number of continuous runs, corresponding torun-length compression rules 1 to 6 is determined (steps ST1110 toST1113).

After the number of continuous runs is determined, the subsequent 2 bitsobtained afterward is used as a pixel pattern (pixel data; pixel colorinformation) (step ST1114).

When the pixel data (pixel color information) is determined, indexparameter "i" is set to 0 (step ST1115). Until parameter "i" coincideswith the number of continuous runs (step ST1116), a 2-bit pixel patternis output (step ST1117), and parameter "i" is incremented by one (stepST1118). After identical data corresponding to one unit is output, thedecoding processing is completed.

As described above, according to this sub-picture decoding method,sub-picture data can be decoded by simple processing, i.e., onlydetermination processing for several bits, data block separationprocessing, and data bit counting processing. For this reason, a largecode table used in the conventional MH coding method or the like is notrequired, and the processing/arrangement for decoding encoded bit datainto original pixel information can be simplified.

In the above embodiment, the encoded bit length of identical pixelscorresponding to one unit can be determined by reading a maximum of16-bit data in a decoding operation. However, the encoded bit length isnot limited to this value. For example, the encoded bit length may be 32or 64 bits. However, as the bit length increases, a data buffer having alarger capacity is required.

In addition, in the above embodiment, pixel data (pixel colorinformation) includes pieces of color information of three colorsselected from, e.g., a 16-color color palette. Instead of using suchpixel data, pieces of amplitude information of the three primary colors(e.g., red R, green G, and blue B; or intensity Y, chroma-red Cr, andchroma-blue Cb) can be expressed by 2-bit pixel data. That is, pixeldata is not limited to specific color information.

FIG. 17 shows a modification of the embodiment of FIG. 11. In theembodiment of FIG. 11, the coding header is separated by microcomputer112 in software basis. On the other hand, in the embodiment of FIG. 17,the coding header is separated based on the hardware in decoder 101.

More specifically, as shown in FIG. 17, sub-picture data SPD subjectedto the run-length compression is sent, via data I/O 102, to the internalbus of decoder 101. Sub-picture data SPD on the internal bus is sent tomemory 108 through memory controller 105, and is then stored in memory108. The internal bus of decoder 101 is connected to coding dataseparator 103, to continuous code length detector 106, and to headerseparator 113 which is coupled to microcomputer (MPU or CPU) 112.

Sub-picture unit header 31 of the sub-picture data read from memory 108is read by header separator 113. Separator 113 detects variousparameters shown in FIG. 4 from read header 31. Based on the detectedparameters, separator 113 sets at address controller 109 the startaddress (SPDDADR) of decoding; at display activator 110 the information(SPDSIZE) of the display width and display height of the sub-picture aswell as the display start position of the sub-picture; and at codingdata separator 103 the display width (the number of dots of the line).These set information pieces are stored in the internal registers ofcorresponding circuit blocks (109, 110, and 103). Thereafter,microcomputer 112 can access the parameters stored in the circuit blocks(109, 110, and 103).

Address controller 109 accesses memory 108 through memory controller 105in response to the starting address (SPDDADR) of decoding set at theregister of controller 109, so that the reading of the sub-picture datato be decoded starts. The sub-picture data read from memory 108 issupplied to coding data separator 103 and to continuous code lengthdetector 106.

The coding header (e.g., 2 to 14 bits of rules 2 to 5 in FIG. 5) ofrun-length-compressed sub-picture data SPD is detected by continuouscode length detector 106. The number of pixels followed with respect tothe same pixel data within sub-picture data SPD is detected byrun-length setter 107 in accordance with the signal from continuous codelength detector 106.

Another decoding method differing from the decoding method of FIGS. 15and 16 will be explained with reference to FIGS. 17 to 21.

FIG. 18 is a flow chart for explaining the former processing of theimage decoding (run-length expansion) according to another embodiment ofthe present invention.

When the decoding starts, respective blocks in decoder 101 of FIG. 17are initialized (e.g., registers are cleared and counters are reset).Thereafter, sub-picture unit header 31 is read, and the contents(various parameters shown in FIG. 4) of header 31 are set at internalregisters of header separator 113 (step ST1200).

After the parameters of header 31 are set at the registers of headerseparator 113, microcomputer 112 is informed of the end status ofreading of header 31 (step ST1201).

When microcomputer 112 receives the end status of header reading, itdesignates the start line of decoding (e.g., SPLine 1 in FIG. 4). Thedesignated start line of decoding is sent to header separator 113 (stepST1202).

When header separator 113 receives the designated start line ofdecoding, separator 113 refers to the various parameters set in its ownregisters. Then, according to the parameters set in the registers ofseparator 113, the following data set operations are performed (stepST1203):

the designated decoding start line address (SPDDADR in FIG. 4) and thedecoding end address (SPEDADR in FIG. 4; the address obtained byrelatively-shifting by one line from the start line address) are set ataddress controller 109;

the display start position, display width, and display height of thedecoded sub-picture (SPDSIZE in FIG. 4) are set at display activator110; and

the width of display (LNEPIX; although not shown, LNEPIX is part ofSPDSIZE in FIG. 4 and indicates the number of dots on one line) is setat coding data separator 103.

Address controller 109 sends the decoding addresses to memory controller105. Then, the data to be decoded (i.e., compressed sub-picture dataSPD) is read, via memory controller 105, from memory 108 to coding dataseparator 103 and to continuous code length detector 106. In this case,the read data is set at respective registers of separator 103 anddetector 106 in unit of RbyteS (step ST1204).

Continuous code length detector 106 counts the number of 0-bit of thedata read from memory 108, and detects the coding header correspondingto either of rules 1 to 5 shown in FIGS. 5A-5E (step ST1205). Details ofdetection of the coding header will be described later with reference toFIG. 20.

Then, continuous code length detector 106 generates separationinformation SEP.INFO. corresponding to either of rules 1 to 5 shown inFIGS. 5A-5E (step ST1206).

More specifically, for example, when the count of 0-bit of data readfrom memory 108 is zero, separation information SEP.INFO. indicatingrule 1 is obtained; when the count of 0-bit of data read from memory 108is two, separation information SEP.INFO. indicating rule 2 is obtained;when the count of 0-bit of data read from memory 108 is four, separationinformation SEP.INFO. indicating rule 3 is obtained; when the count of0-bit of data read from memory 108 is six, separation informationSEP.INFO. indicating rule 4 is obtained; and when the count of 0-bit ofdata read from memory 108 is fourteen, separation information SEP.INFO.indicating rule 5 is obtained. The separation information SEP.INFO. thusobtained is sent to coding data separator 103.

In accordance with the content of separation information SEP.INFO. fromcontinuous code length detector 106, coding data separator 103 sets thenumber of pixels followed (PIXCNT; run information) at run length setter107. Further, coding data separator 103 sets at pixel color output stage104 the 2-bit pixel data (pixel color data picked up from thesub-picture data packet) subsequent to the number of pixels followed. Atthis time, current count value NOWPIX of a pixel counter (not shown) inseparator 103 is incremented by number PIXCNT of pixels followed (stepST1207).

FIG. 19 is a flow chart for explaining the latter processing (subsequentto node A in FIG. 18) of the image decoding (run-length expansion)according to another embodiment of the present invention.

In the former step ST1203, coding data separator 103 is informed, byheader separator 113, of the number LNEPIX of pixel data (the number ofdots) of one line corresponding to the display width of the sub-picture.Coding data separator 103 checks whether the value NOWPIX of theinternal pixel counter of separator 103 exceeds the value LNEPIX of theinformed one-line pixel data (step ST1208).

In step ST1208, when the pixel count value NOWPIX is equal to or largerthan the one-line pixel data value LNEPIX (NO at step ST1208), theinternal register of separator 103, to which one byte data is set, iscleared, and the pixel count value NOWPIX becomes zero (step ST1209). Atthis time, if the data has been byte-aligned, the trailing 4-bit data isdiscarded or neglected. On the other hand, when the pixel count valueNOWPIX is smaller than the one-line pixel data value LNEPIX (YES at stepST1208), the internal register of separator 103 is not cleared, or thestate of the internal register remains.

Run length setter 107 responds to the number PIXCNT (run information) ofpixels followed set at the former step ST1207, to dot clock DOTCLKdetermining the rate of transferring the pixel dots, and to horizontal-and vertical-sync signals H-SYNC and V-SYNC for synchronizing thesub-picture to the main picture display. In response to these data orsignals, run length setter 107 generates a display period signal (PERIODSIGNAL) which is provided for enabling pixel color output stage 104 tooutput for a required period of time the pixel data set in stage 104.The generated PERIOD SIGNAL is sent to pixel color output stage 104(step ST1210).

Pixel color output stage 104 outputs, as display data of the decodedsub-picture, the separated data (e.g., pixel data indicating the pixelcolor) set at the former step ST1207 for a period during which thePERIOD SIGNAL is being sent from run length setter 107 to output stage104 (step ST1211).

Thereafter, the sub-picture display data thus obtained can be properlysuperimposed to a main picture by a specific circuit block (not shown),and an image of the superimposed main/sub-picture can be displayed on aTV monitor (not shown).

After the output processing of the pixel data at step ST1211 iscompleted, if the data to be decoded remains, the flow returns to theformer step ST1204 (NO at step ST1212).

Whether or not the data to be decoded remains can be determined bychecking if coding data separator 103 completes the data processing forthe end address (SPEDADR) of the sub-picture display data set by headerseparator 113.

When no data to be decoded remains, or the data processing up to the endaddress is completed (YES at step ST1212), it is checked whether adisplay enable signal (DISPLAY ENABLE) from display activator 110 isactive or not. Note that activator 110 generates the active (e.g.,high-level) display enable signal unless activator 110 receives a dataend signal (DATA END SIGNAL) from address controller 109.

Even when the decoding of current data has already been completed, ifthe display enable signal is still active, it is determined that thecurrent state is in the display period of the sub-picture (YES at stepST1213). In this case, display activator 110 sends a color switch signalto run-length setter 107 and to pixel color output stage 104 (stepST1214).

At the time when the color switch signal is sent, pixel color outputstage 104 already receives insufficient pixel color data frominsufficient pixel color setter 111. When output stage 104 receives thecolor switch signal from display activator 110, the pixel color data tobe output is switched to the insufficient pixel color data obtained frominsufficient pixel color setter 111 (step ST1215). Then, so long as thedisplay enable signal is active (or in the loop of steps ST1213 toST1215) during the display period in which no sub-picture data to bedecoded exists, the display area for the sub-picture is filled with theinsufficient pixel color provided by insufficient pixel color setter111.

On the other hand, when the display enable signal is inactive, it isdetermined that the display period for the decoded sub-picture elapses(NO at step ST1213). In this case, display activator 110 suppliesmicrocomputer 112 with an end status indicating that the decoding of thesub-picture(s) of one frame is completed (step ST1216). The decoding ofthe sub-picture(s) in one screen image (or one frame) is thus completed.

FIG. 20 is a flow chart for exemplifying the content of the codingheader detection step ST1205 shown in FIG. 18. The processing of thecoding header detection can be executed by continuous code lengthdetector 106 shown in FIG. 17 (or FIG. 11).

First, continuous code length detector 106 is initialized so that itsinternal status counter (STSCNT; not shown) is set to zero (stepST1301). Then, the contents of two-bit subsequent to the data which hasbeen read from memory 108 to detector 106 in unit of byte are checked.When the contents are "00" (YES at step ST1302), counter STSCNT isincremented by 1 (step ST1303). If the checked two-bit does not reachthe end of one byte (NO at step ST1304), the contents of next two-bitare further checked. When the contents are still "00" (YES at stepST1302), counter STSCNT is further incremented by 1 (step ST1303).

After repeating the processing of the loop of steps ST1302 to ST1304, ifthe checked two-bit reaches the end of one byte (YES at step ST1304), itis determined that the coding header of FIG. 5 is constituted by morethan 6 bits. In this case, continuous code length detector 106 readsnext one byte data from memory 108 (step ST1305), and status counterSTSCNT is set to "4" (step ST1307). At this time, the same one byte datais read by coding data separator 103.

After status counter STSCNT is set to "4", or the contents of two-bitchecked at the former step ST1302 is not "00" (NO at step ST1302), thecontent of status counter STSCNT is established, and the establishedcontent is output as the content of the coding header shown in FIG. 5(step ST1307).

More specifically, when the established content of status counter STSCNTis "0", the coding header of rule 1 of FIG. 5 is detected. WhenSTSCNT="1", the coding header of rule 2 is detected. When STSCNT="2",the coding header of rule 3 is detected. When STSCNT="3" , the codingheader of rule 4 is detected. When STSCNT="4", the coding header of rule5 (the same pixel data continues up to the end of line) is detected.

FIG. 21 is a flow chart for explaining the image decode processingaccording to the present invention, wherein the decoded image isscrolled.

First, the respective blocks in decoder 101 of FIG. 11 or FIG. 17 areinitialized, and line counter LINCNT (not shown) is cleared to zero(step ST1401). Then, microcomputer 112 (FIG. 11) or header separator 113(FIG. 17) receives the header read end status sent at step ST1201 ofFIG. 18 (step ST1402).

The content (zero at initial) of line counter LINCNT is sent tomicrocomputer 112 (FIG. 11) or header separator 113 (FIG. 17) (stepST1403). Microcomputer 112 or header separator 113 checks whether thereceived status is the end status (step ST1206 of FIG. 18) of one frameor one screen (step ST1404).

If the received status is not the end status of one frame (NO at stepST1405), the processing waits for the end status. When the end status isreceived (YES at step ST1405), line counter LINCNT is incremented by one(step ST1406).

When the content of incremented counter LINCNT does not reach the end ofline (NO at step ST1407), decode processing of FIGS. 15 and 16, or thedecode processing of FIGS. 18 and 19 is restarted (step ST1408), and theprocessing returns to step ST1403. To repeat the restart of decoding(steps ST1403 to ST1408), the run-length-compressed sub-picture can bescrolled while it is decoded.

Meanwhile, when the content of incremented counter LINCNT reaches theend of line (YES at step ST1407), the decode processing associated withscrolling of the sub-picture is finished.

FIG. 22 is a block diagram for explaining the brief configuration of anoptical disk record/playback apparatus in which the encoding anddecoding of the present invention are executed.

Optical disk player 300 of FIG. 22 basically has the same configurationas a conventional optical disk playback apparatus (such as a compactdisk player or a laser disk player). However, optical disk player 300has a special configuration that a digital signal, obtained beforedecoding the run-length-compressed image information (i.e., an encodeddigital signal), can be output from inserted optical disk OD on whichrecorded is image information containing run-length-compressedsub-picture data according to the present invention. Since the encodeddigital signal is compressed, the transmission bandwidth necessary tothe encoded digital signal can be narrower than that necessary tonon-compressed data.

The compressed digital signal from optical disk player 300 is on-airedor is output to a communication cable, via modulator/transmitter 210.

The on-aired compressed digital signal or the cable-output compresseddigital signal is received by receiver/demodulator 400 of a user orsubscriber. Receiver 400 is provided with decoder 101 having aconfiguration as shown, for example, in FIG. 11 or FIG. 17. Decoder 101of receiver 400 decodes the compressed digital signal having beenreceived and demodulated, so as to output image information containingthe original sub-picture data before encoded.

In the configuration of FIG. 22, when the transmission system of thetransmitter/receiver has an average bit rate of more than about5M-bit/s, high-quality multi-media video/audio information can betransmitted.

FIG. 23 is a block diagram for explaining a case wherein imageinformation encoded on the basis of the present invention is exchangedbetween two arbitrary computers through a communication network (e.g.,an internet).

User #1 having user's source #1, which is managed by a host computer(not shown), has personal computer 5001. Various input/output devices5011 and various external memory units 5021 are connected to computer5001. Modem card 5031 incorporating the encoder and the decoder of thepresent invention and having a function required for communication isinserted in an internal slot (not shown) of personal computer 5001.

Similarly, user #N having user's source #N has personal computer 500N.Various input/output devices 501N and various external memory units 502Nare connected to computer 500N. Modem card 503N incorporating theencoder and the decoder of the present invention and having a functionrequired for communication is inserted in an internal slot (not shown)of personal computer 500N.

Assume that user #1 operates computer 5001 to communicate with computer500N of another user #N through line 600 such as an internet. In thiscase, since both users #1 and #N have modem cards 5031 and 503Nincorporating the encoders and the decoders, compressed image data canbe efficiently exchanged within a short period of time.

FIG. 24 shows a configuration of a record/playback apparatus forrecording on optical disk OD the image information encoded according tothe present invention, and for playing back the recorded information todecode it according to the present invention.

Encoder 200 of FIG. 24 is so constructed that it performs the encodeprocessing (corresponding to the processing of FIGS. 13 and 14 ) similarto the encode processing of encoder 200 of FIG. 10, provided thatencoder 200 of FIG. 24 executes the encode processing based on asoftware or hardware (containing a firmware or wired-logic circuits).

The record signal containing sub-picture data encoded by encoder 200,etc. is subjected to, for example, a (2, 7) RLL modulation atmodulator/laser driver 702. The modulated record signal is sent fromlaser driver 702 to a high-power laser diode mounted in optical head704. A particular pattern corresponding to the record signal is writtenin a magneto-optical disk or phase-change optical disk OD by means ofthe recording laser from optical head 704.

Thereafter, the information written in disk OD is read by a laser pickupof optical head 706. The read information is then demodulated atdemodulator/error correction circuit 708 in which an error correction isperformed, if necessary. The demodulated and error-corrected signal issubjected to various data processing at data processor 710 foraudio/video information, so that information, equivalent to the originalinformation before recording, is played back.

Data processor 710 includes a decode processing portion correspondingto, for example, decoder 101 of FIG. 11. This decode processing portioncan perform the decoding (i.e., expanding of compressed sub-picturedata) of FIGS. 15 and 16.

FIG. 25 shows an example of an IC device in which the encoder of thepresent invention is integrated with its peripheral circuits.

FIG. 26 shows an example of an IC device in which the decoder of thepresent invention is integrated with its peripheral circuits.

FIG. 27 shows an example of an IC device in which the encoder anddecoder of the present invention are integrated with their peripheralcircuits.

Thus, the encoder and/or the decoder according to the present inventioncan be reduced to practice in a form of a semiconductor integratedcircuit (IC). The present invention can be embodied by installing suchan IC in various apparatuses.

Generally, the data line on which the bit train of compressed data (PXD)as shown in FIG. 9 is arranged includes the image information of onehorizontal scanning line of a TV display screen. However, the data linemay include the image information of two or more horizontal scanninglines of the TV display screen, or may include the image information ofall horizontal scanning lines of one TV display screen (or one frame ofthe TV display screen).

Incidentally, the target of data encoding based on the compression rulesof the present invention is not limited to the sub-picture data (colorinformation with respect to 3 or 4 colors) explained in the presentspecification. When the portion of the pixel data is constituted by morebit numbers, various information can be packed in this portion. Forinstance, if 8-bit per one pixel dot is assigned to the pixel data,256-color pictures can be transmitted only by the sub-picture (inaddition to a main picture).

As has been described above, according to the present invention, insteadof performing decoding after reading 1-line data, data is decoded in asmall unit by making bit data configurations conform to a plurality ofcompression rules every time data is read in units of bits. For thisreason, according to the present invention, a large code table need notbe set in the decoder unlike in the MH coding method. In addition, thesame data need not be read twice in an encoding operation unlike in thearithmetic coding method. Furthermore, the decoding side may use asimple counter for counting bit data but requires no multiplier in adecoding operation unlike in the arithmetic coding method. According tothe present invention, therefore, decoding processing can be maderelatively simple.

Additional advantages and modifications will readily occur to thoseskilled in the art. Therefore, the invention in its broader aspects isnot limited to the specific details, representative devices, andillustrated examples shown and described herein. Accordingly, variousmodifications may be made without departing from the spirit or scope ofthe general inventive concept as defined by the appended claims andtheir equivalents.

What is claimed is:
 1. A system of encoding and decoding an integralbody of information which is formed of a plurality of pixel data eachdefined by a predetermined number of bits, wherein a data block,containing same continuous pixel data, is compressed as one unit ofcompression and a bit train of the compressed data block is thenexpanded, the system comprising a combination of:(a) encoding processingincluding:generating a compressed unit data block in accordance with acoding header corresponding to a continuing number of the same pixeldata in the data block of the one compression unit, with a number ofpixels followed indicating the continuing number of the same pixel data,and with data representing the same pixel data in the data block of theone compression unit, and (b) decoding processing including:codingheader detecting for detecting the coding header from the data block ofthe one compression unit generated by the generating of the compressedunit data block of the encoding processing, wherein the coding headerindicates the number of pixels followed, or indicates a group of thenumber of pixels followed and the same pixel data; continuous pixelnumber detecting for detecting from the data block the number data ofthe pixels followed, after the coding header is detected; pixel datadetermining for determining a content of the pixel data in anuncompressed data block of the one compression unit, in accordance witha remainder of the data block of the one compression unit, from whichare removed the detected coding header detected by the coding headerdetecting and the detected number data of the pixels followed detectedby the continuous pixel number detecting; and pixel pattern restorationfor arranging bit data of the determined content determined by the pixeldata determining, by a number indicated by the detected number data ofthe pixels followed detected by the continuous pixel number detecting,so as to restore a pattern of uncompressed pixel data of the onecompression unit, wherein the integral body of information includes aspecific header comprising information of a size of the integral body ofinformation.
 2. The method of claim 1, wherein said integral body ofinformation is represented by contents of a group of data packets, eachof the data packets including sub-picture data relating to said pixeldata and a packet header thereof.
 3. A decoding apparatus for decoding abit train of a unit of a compressed data block, which is obtained bycompressing same continuous pixel data as one unit of compression,wherein the compressed data block corresponds to at least part of aninformation integral body formed by a plurality of pixel data eachdefined by a predetermined number of bits, and wherein the compresseddata block includes either a coding header indicating data of a numberof pixels followed, which number data corresponds to the number of thesame continuous pixel data, or a coding header indicating the numberdata of pixels followed as well as the same continuous pixel data, thedecoding apparatus comprising:a coding header detecting means fordetecting the coding header from the data block of the one compressionunit contained in the information integral body; a continuous pixelnumber detecting means for detecting the number data of the pixelsfollowed, from the data block of the one compression unit, in accordancewith a content of the coding header detected by the coding headerdetecting means; a pixel data determining means for determining acontent of the pixel data in an uncompressed data block of the onecompression unit, in accordance with a remainder of the data block ofthe one compression unit, from which removed are the coding headerdetected by the coding header detecting means and the number data of thepixels followed detected by the continuous pixel number detecting means;and a pixel pattern restoration means for arranging bit data of thecontent determined by the pixel data determining means, by a numberindicated by the number data of the pixels followed detected by thecontinuous pixel number detecting means, so as to restore a pattern ofuncompressed pixel data of the one compression unit, wherein theinformation integral body includes a specific header comprisinginformation of a size of the information integral body.